vendredi 28 août 2015

Returning a constexpr std::array

When I try to compile this class, the linker tells me that FooHandler ::getFoo is is not found for architecture x86_64.

enum class Foo {Bar};


class FooHandler {

public:

    constexpr std::array<Foo, 1> static getFoo() {
        return foo;
    }

    static constexpr std::array<Foo, 1> foo = { {Foo::Bar} };
};

Is there anything I am missing here?

Aucun commentaire:

Enregistrer un commentaire