0

I am trying to wrap my mind around this talk: https://www.youtube.com/watch?v=FXfrojjIo80 I get an error on the following part. It is the simplified version.

template<typename... Ts>
struct parms : Ts... {};

template<typename... Ts>
parms(Ts... ) -> parms<Ts...>;

struct first{};
struct second{};

int main(int argc, char *argv[])
{   
    parms p(first{}, second{});  
}

I get a compile error on clang but compiles on gcc. Which C++ feature is this that is not supported in clang? Obviously if i change the ( to { it compiles fine.

Amir
  • 189
  • 2
  • 12
  • 3
    This is [P0960R3](https://wg21.link/P0960r3), which [clang doesn't support](https://clang.llvm.org/cxx_status.html) – Artyer Mar 27 '22 at 20:49

1 Answers1

1

Cppreference aptly calls it "Parenthesized initialization of aggregates".

HolyBlackCat
  • 78,603
  • 9
  • 131
  • 207