1

I have a piece of source code (based on C++ 17 The complete guide, Chapter 14: Extended Using Declarations):

struct A{void foo(){}};

template<typename T>
struct SomeStruct : T
{
};

template<typename T>
SomeStruct(T)->SomeStruct<T>;

int main()
{
    SomeStruct<A> a;
    a.foo();
    return 0;
}

I don't understand the meaning of -> here. It doesn't look like a trailing return type.

amplifier
  • 1,793
  • 1
  • 21
  • 55

0 Answers0