[PATCH] D79800: [Sema] Remove default values for arguments prior to a parameter pack if the pack is used

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 22:45:53 PDT 2020


Quuxplusone added inline comments.


================
Comment at: clang/test/CXX/drs/dr7xx.cpp:225
 template <typename... T>
 void f(int i = 0, T ...args) {}
 void ff() { f(); }
----------------
Is this even supposed to compile? The only valid specializations of `f` require `T...` to be an empty pack, which violates [temp.res/8.3](https://timsong-cpp.github.io/cppwp/temp.res#8.3).

The comment mentions [DR777](http://cwg-issue-browser.herokuapp.com/cwg777), but DR777 doesn't explain the circumstances under which its wording change matters. It //seems// only to apply to templates that are already ill-formed by temp.res/8.3.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79800/new/

https://reviews.llvm.org/D79800





More information about the cfe-commits mailing list