[PATCH] D98087: [clang] Fix constrained decltype(auto) deduction

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 5 15:57:37 PST 2021


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Looks good, thanks!



================
Comment at: clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:59-63
+  True decltype(auto) e = a;
+  static_assert(is_same_v<decltype(e), int>);
+
+  True decltype(auto) f = b;
+  static_assert(is_same_v<decltype(f), int&>);
----------------
For completeness, it'd be nice to test the `decltype((...))` case too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98087



More information about the cfe-commits mailing list