Skip to content

wise_enum::size compile error #29

@martinfinke

Description

@martinfinke

I'm trying to use wise_enum::size like this:

class MyClass final {
public:
    WISE_ENUM_MEMBER(Parameter, First, Second)

    array<Foo, wise_enum::size<Parameter>> values;
};

Unfortunately, I'm getting a compiler error on this line saying: "Constexpr variable 'range' must be initialized by a constant expression" and "Undefined function 'wise_enum_detail_array' cannot be used in a constant expression".

wise_enum_detail_array seems to be defined through the WISE_ENUM_IMPL_ADAPT_3 macro, but I couldn't figure out what exactly is going wrong there..

Any help would be much appreciated! 😊 I'm using Xcode Version 10.1 (10B61) with C++14 standard, with wise_enum at the latest master commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions