Template Argument Deduction Broken in Clang 6 for Temporary Objects
Template argument deduction appears to be broken in Clang 6 for temporary objects. g++ 8.1.0 compiles and runs the example correctly. Clang 6.0.0 and 6.0.2 both error at the indicated line with this message: error: expected unqualified-id Print{1,"foo"s,2}; /********** Broken in Clang **********/ All Other lines work correctly. The behavior is the same in both cases whether -std=c++17 or -std=c++2a is used. The Clang c++ Status Page indicates that template argument deduction was implemented as of Clang 5 (P0091R3, P0512R0). Is this a bug? Are there workarounds (e.g. compiler flags, not code