summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/trailing15.C
blob: 3fa74d08e392dffeafbad0599e6d770415c55f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/101051
// { dg-do compile { target c++11 } }

template <class T>
class Foo
{
    constexpr operator T() -> T {} // { dg-error "trailing return" }
};

struct S {
  operator int() const -> double; // { dg-error "trailing return" }
};

class A { operator auto*() -> int; }; // { dg-error "auto|trailing return" }