re PR c++/51723 ([C++0x] delegating constructor ICE)
2012-01-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51723 * g++.dg/cpp0x/constexpr-delegating2.C: New. From-SVN: r182768
This commit is contained in:
parent
06f1716bd7
commit
1d2314ed1c
2 changed files with 30 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51723
|
||||
* g++.dg/cpp0x/constexpr-delegating2.C: New.
|
||||
|
||||
2012-01-01 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR rtl-optimization/51069
|
||||
|
|
25
gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
Normal file
25
gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
Normal file
|
@ -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)
|
||||
{ }
|
||||
};
|
Loading…
Add table
Reference in a new issue