summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr44.C
blob: 9ceba14fc98017f3bedd69e6c2af9cdf581f59fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/91979
// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE" } }

template <bool, typename T = void>
struct enable_if {};

template <typename T>
struct enable_if<true, T> { typedef T type; };

template <void *P>
void foo(typename enable_if<P == nullptr>::type* = 0) {}

template void foo<(void *)0>(void *);