OSDN Git Service

PR c++/51553
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-non-const-arg2.C
1 // PR c++/47200
2 // { dg-options "-std=c++0x -w" }
3
4 template < int > struct duration
5 {
6   constexpr int count ();
7   static constexpr duration min ();
8 };
9
10 constexpr int
11 f (duration < 0 > d, duration < 0 > )
12 {
13   return d.count ();
14 }
15
16 static_assert (f (duration < 0 >::min (), duration < 0 > ()), ""); // { dg-error "non-constant|before its definition" }