News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Autocompletion fails for brace initialized variables CB 17.12

Started by Hyena, March 02, 2020, 11:50:16 AM

Previous topic - Next topic

Hyena

Here's a piece of code from a header file that fails to auto-complete.


enum class POSITION {
    NONE = 0, // Must always be zero
    STUNNED,
    SLEEPING,
    RESTING,
    FIGHTING,
    STANDING,
    FLEEING
};

constexpr const POSITION
    POS_NONE    { POSITION::NONE        },
    POS_STUNNED { POSITION::STUNNED     },
    POS_SLEEPING{ POSITION::SLEEPING    },
    POS_RESTING { POSITION::RESTING     },
    POS_FIGHTING{ POSITION::FIGHTING    },
    POS_STANDING{ POSITION::STANDING    },
    POS_FLEEING { POSITION::FLEEING     };



When I type POS_ I expect it to make a suggestion. This works if I have defined each constant using the = symbol, but not when using braces {}.


// this works as expected
constexpr const POSITION POS_FLEEING = POSITION::FLEEING, POS_STANDING = POSITION::STANDING;