Template Argument Deduction Broken in Clang 6 for Temporary Objects

后端 未结 1 1010
囚心锁ツ
囚心锁ツ 2020-12-11 16:56

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 b

相关标签:
1条回答
  • 2020-12-11 17:37

    This is Clang bug 34091.

    Luckily, it is already fixed, and the trunk build of Clang compiles this without issue.

    As far as I know, however, there is currently no way to work around this without code changes, short of upgrading to the next Clang release whenever that comes out.

    0 讨论(0)
提交回复
热议问题