aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype54.C
blob: 9d301c0a73922c4c89fcde8857ab5886aec063c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// PR c++/51908
// { dg-do compile { target c++11 } }

struct foo1
{
  template <typename Ret, typename... Args>
  operator decltype(static_cast<Ret (*)(Args...)>(nullptr)) () const;
};

struct foo2
{
  template <typename Ret, typename... Args>
  operator decltype(static_cast<Ret (*)(Args... args)>(nullptr)) () const;
};

struct foo3
{
  template <typename Ret, typename Arg>
  operator decltype(static_cast<Ret (*)(Arg)>(nullptr)) () const;
};

struct foo4
{
  template <typename Ret, typename Arg>
  operator decltype(static_cast<Ret (*)(Arg arg)>(nullptr)) () const;
};