You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
template < class T >
struct Foo {
T v;
constexpr Foo() : v(){}
static const Foo f;
};
template < class T >
constexpr const Foo Foo::f = Foo();
std::array<int, Foostd::size_t::f.v> a;
Clang rejects this, because it doesn't eagerly instantiate Foo<size_t>::f, presumably because the constexpr specifier isn't seen until the out-of-line definition is instantiated.
The text was updated successfully, but these errors were encountered:
Extended Description
Consider:
template < class T >
struct Foo {
T v;
constexpr Foo() : v(){}
static const Foo f;
};
template < class T >
constexpr const Foo Foo::f = Foo();
std::array<int, Foostd::size_t::f.v> a;
Clang rejects this, because it doesn't eagerly instantiate Foo<size_t>::f, presumably because the constexpr specifier isn't seen until the out-of-line definition is instantiated.
The text was updated successfully, but these errors were encountered: