re PR c++/53464 (Invalid default value for non-type template parameter is accepted)
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53464 * g++.dg/cpp0x/constexpr-default1.C: New. From-SVN: r187842
This commit is contained in:
parent
73fb763006
commit
a5dedb5e59
|
@ -1,3 +1,8 @@
|
|||
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53464
|
||||
* g++.dg/cpp0x/constexpr-default1.C: New.
|
||||
|
||||
2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/32080
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// PR c++/53464
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template <int value>
|
||||
struct bar
|
||||
{
|
||||
static constexpr int get()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename A, int value = A::get()>
|
||||
struct foo
|
||||
{
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef foo<bar<0>> type;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue