]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/decltype28.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype28.C
CommitLineData
4324a55c 1// PR c++/44175
4b2e63de 2// { dg-do compile { target c++11 } }
4324a55c
JM
3
4template <bool, class T> struct enable_if { };
5template <class T> struct enable_if <true, T> { typedef T type; };
6
7template <class F, int N>
8void ft (F f, typename enable_if<N!=0, int>::type) {}
9
10template< class F, int N >
03b8c9bf
JM
11decltype(ft<F, N-1> (F(), 0)) // { dg-error "depth" }
12ft (F f, typename enable_if<N==0, int>::type) {}
4324a55c
JM
13
14int main() {
3ff60975 15 ft<struct a*, 2> (0, 0); // { dg-message "from here" }
4324a55c 16}
75a0d320
PC
17
18// { dg-prune-output "compilation terminated" }
This page took 5.919227 seconds and 5 git commands to generate.