https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86009

            Bug ID: 86009
           Summary: [Concepts] Placeholder as argument to
                    partial-concept-id forms extra constrained parameters
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hstong at ca dot ibm.com
  Target Milestone: ---

When a partial-concept-id is formed with a constrained-type-specifier as an
argument, extra parameters are invented by GCC.

### SOURCE (<stdin>):
template <typename T, typename U> concept bool C0 = true;
template <typename T> concept bool C1 = true;
void f(C0<C1> *) { }

template void f<wchar_t, short>(wchar_t *);


### COMPILER INVOCATION COMMAND:
g++ -fsyntax-only -xc++ -fconcepts -


### ACTUAL OUTPUT:
<stdin>:5:15: error: template-id 'f<wchar_t, short int>' for 'void f(wchar_t*)'
does not match any template declaration
<stdin>:3:6: note: candidate is: 'template<class auto:1, class auto:2, class
auto:3, class auto:4>  requires  C1<auto:1> and C0<auto:2, auto:1> and
C1<auto:3> and C0<auto:4, auto:3> void f(auto:4*)'


### EXPECTED OUTPUT:
(Clean compile).


### COMPILER VERSION INFO (g++ -v):
Using built-in specs.
COLLECT_GCC=/opt/wandbox/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../source/configure --prefix=/opt/wandbox/gcc-head
--enable-languages=c,c++ --disable-multilib --without-ppl --without-cloog-ppl
--enable-checking=release --disable-nls --enable-lto
LDFLAGS=-Wl,-rpath,/opt/wandbox/gcc-head/lib,-rpath,/opt/wandbox/gcc-head/lib64,-rpath,/opt/wandbox/gcc-head/lib32
Thread model: posix
gcc version 9.0.0 20180529 (experimental) (GCC)

Reply via email to