aeubanks wrote:

this breaks
```
$ cat /tmp/a2.ii
template <bool> struct enable_if;
template <class> struct A {

  template <class... B> struct C {
    C(B...);
    template <class A, enable_if<A::valueint> = 0>
    C(A);
  };

  template <class... B>
  C(B...) -> C<B...>;
};

int New;

struct S : A<int> {
  void f() { C{New}; }
};

$ clang -fsyntax-only -std=c++20 /tmp/a2.ii
/tmp/a2.ii:17:14: error: no matching constructor for initialization of 'C<>' 
(aka 'A<int>::C<>')                                                             
                                                                                
                                             
   17 |   void f() { C{New}; }                                                  
                                                                                
                                                                                
                                          
      |              ^~~~~~                                                     
                                                                                
                                                                                
                                          
/tmp/a2.ii:4:32: note: candidate constructor (the implicit copy constructor) 
not viable: no known conversion from 'int' to 'const C<>' for 1st argument      
                                                                                
                                             
    4 |   template <class... B> struct C {                                      
                                                                                
                                                                                
                                          
      |                                ^                                        
                                                                                
                                                                                
                                          
/tmp/a2.ii:4:32: note: candidate constructor (the implicit move constructor) 
not viable: no known conversion from 'int' to 'C<>' for 1st argument            
                                                                                
                                             
    4 |   template <class... B> struct C {
      |                                ^
/tmp/a2.ii:7:5: note: candidate template ignored: substitution failure [with A 
= int]: type 'int' cannot be used prior to '::' because it has no members
    6 |     template <class A, enable_if<A::valueint> = 0>
      |                                  ~
    7 |     C(A);
      |     ^
/tmp/a2.ii:5:5: note: candidate constructor not viable: requires 0 arguments, 
but 1 was provided
    5 |     C(B...);
      |     ^
1 error generated.

```
is that intentional?

https://github.com/llvm/llvm-project/pull/69676
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to