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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2019-02-18 00:00:00         |2022-5-20

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I lost two hours of my life last night because of this error:

vt.C:276:15: error: conversion from 'std::tuple<int, double,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
>' to non-scalar type 'tuple<int, float, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > >' requested
  276 |     make_tuple(17, 2.718281828, std::string("Fun"));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I might have notice sooner that it's "std::tuple" vs "tuple" if I hadn't been
double- and triple-checking the std::__cxx11::basic_string noise :-(

Without default template args:

vt.C:276:15: error: conversion from 'std::tuple<int, double,
std::__cxx11::basic_string<char> >' to non-scalar type 'tuple<int, float,
std::__cxx11::basic_string<char> >' requested
  276 |     make_tuple(17, 2.718281828, std::string("Fun"));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And with std::__cxx11::basic_string replaced with just std::string:

vt.C:276:15: error: conversion from 'std::tuple<int, double, std::string>' to
non-scalar type 'tuple<int, float, std::string>' requested
  276 |     make_tuple(17, 2.718281828, std::string("Fun"));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(I've reported PR 105672 to improve this specific case, as the real problem is
orthogonal to the request for improving std::__cxx11::basic_string output.)

Reply via email to