| 1 |
// PR c++/110323 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
using P = struct { }*; |
| 5 |
using N = struct A { }*; |
| 6 |
|
| 7 |
template<bool B, class T, class F> |
| 8 |
struct conditional { using type = T; }; |
| 9 |
|
| 10 |
struct foo { |
| 11 |
template <int B> |
| 12 |
void bar(typename conditional<((P) 0, B), int, float>::type arg) { } |
| 13 |
|
| 14 |
template <int B> |
| 15 |
void baz(typename conditional<((N) 0, B), int, float>::type arg) { } |
| 16 |
}; |
| 17 |
|
| 18 |
template void foo::bar<1>(int arg); |
| 19 |
template void foo::baz<1>(int arg); |
| 20 |
|
| 21 |
// { dg-final { scan-assembler-not "_ZN3foo3barILi1EEEvN11conditionalIXcmcvP1XLi0EneT_Li0EEifE4typeE" } } |
| 22 |
// { dg-final { scan-assembler "_ZN3foo3bazILi1EEEvN11conditionalIXcmcvP1ALi0EneT_Li0EEifE4typeE" } } |