Message ID | 4F006049.2040600@oracle.com |
---|---|
State | New |
Headers | show |
Index: g++.dg/cpp0x/constexpr-delegating2.C =================================================================== --- g++.dg/cpp0x/constexpr-delegating2.C (revision 0) +++ g++.dg/cpp0x/constexpr-delegating2.C (revision 0) @@ -0,0 +1,25 @@ +// PR c++/51723 +// { dg-options -std=c++0x } + +template <int... V> +struct A +{ + static constexpr int a[sizeof...(V)] = { V... }; +}; + +template <int... V> constexpr int A<V...>::a[]; + +struct B +{ + const int* const b; + + template <unsigned int N> + constexpr B(const int(&b)[N]) + : b(b) + { } + + template <int... V> + constexpr B(A<V...>) + : B(A<V...>::a) + { } +};