https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88373
Bug ID: 88373 Summary: parse error in template argument list when using bitwise not with -std=c++2a switch Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: emmanuel.le-tr...@cnrs-orleans.fr Target Milestone: --- Using the bitwise not in a non-type template argument produces a parse error with the -std=c++2a switch on. It works fine without the switch. It also works with the switch on in version 8.2.1. $ cat bug_3.cpp template <class T> constexpr T value = T {}; template <class T, T t> struct S {}; using U = S <int, ~value <int>>; $ g++-9 -c bug_3.cpp && echo OK OK $ g++-9 -c -std=c++2a bug_3.cpp bug_3.cpp:7:15: error: parse error in template argument list 7 | using U = S <int, ~value <int>>; | ^~~~~~~~~~~~~~~~~~~~~ g++-9 -v Using built-in specs. COLLECT_GCC=g++-9 COLLECT_LTO_WRAPPER=/home/manu/system/opt/gcc-9/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-9/configure --prefix=/home/manu/system/opt/gcc-9 --program-suffix=-9 Thread model: posix gcc version 9.0.0 20181204 (experimental) (GCC)