[llvm-bugs] [Bug 47352] clang rejects valid code for error: no viable constructor or deduction guide for deduction

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 22 10:57:35 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47352

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 CC|                            |dblaikie at gmail.com
             Status|NEW                         |RESOLVED

--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
Looks like GCC ToT rejects this too:

$ clang++-tot valid.cpp -c
valid.cpp:13:15: error: use of class template 'A<int>::B' requires template
arguments
    A< int >::B v(0, int_< 0 >());
              ^
valid.cpp:6:12: note: template is declared here
    struct B{
           ^
1 error generated.
blaikie at blaikie-linux2:~/dev/scratch$ g++-tot valid.cpp -c
valid.cpp: In function ‘int main()’:
valid.cpp:13:17: error: missing template arguments before ‘v’
   13 |     A< int >::B v(0, int_< 0 >());
      |                 ^
valid.cpp:14:11: error: ‘v’ was not declared in this scope
   14 |     (void)v;
      |           ^


https://godbolt.org/z/67WTY5

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200922/09e67799/attachment.html>


More information about the llvm-bugs mailing list