[Bug libstdc++/65630] New: [5 Regression] operator+ for new std::string not exported
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 30 13:57:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65630
Bug ID: 65630
Summary: [5 Regression] operator+ for new std::string not
exported
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
#include <string>
void test01()
{
bool test __attribute__((unused)) = true;
std::string t;
t = t + t;
t = "" + t;
t = 't' + t;
}
int main()
{
test01();
}
This fails to link when compiled with -fno-implicit-templates
/tmp/ccKmD1iH.o: In function `test01()':
/tmp/s.cc:9: undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
/tmp/s.cc:10: undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(char const*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
/tmp/s.cc:11: undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(char,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
More information about the Gcc-bugs
mailing list