summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr33.C
blob: 75c782ac8ffd1e0c1307b6e93479eca83ea902d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/63757
// { dg-do compile { target c++11 } }

typedef decltype(nullptr) nullptr_t;

void bar(void*) {}
 
struct foo
{
  operator nullptr_t()
  {
    return nullptr;
  }
};

int main()
{
  bar(foo());
}