Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: Hyena on March 02, 2020, 11:50:16 am

Title: Autocompletion fails for brace initialized variables CB 17.12
Post by: Hyena on March 02, 2020, 11:50:16 am
Here's a piece of code from a header file that fails to auto-complete.

Code
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 {}.

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