view gcc/testsuite/g++.dg/cpp0x/nullptr44.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// 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 *);