[Bug c++/85883] class template argument deduction fails in new-expression

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 23 15:34:00 GMT 2018


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
r245826 changed this from

error: initialization of new-expression for type ‘auto’ requires exactly one
element
     auto y = new Bar(3, 4);
                     ^
to
error: class template argument deduction failed:
     auto y = new Bar(3, 4);
                     ^           
error: no matching function for call to ‘Bar()’


More information about the Gcc-bugs mailing list