This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65630] New: [5 Regression] operator+ for new std::string not exported
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Mar 2015 13:25:03 +0000
- Subject: [Bug libstdc++/65630] New: [5 Regression] operator+ for new std::string not exported
- Auto-submitted: auto-generated
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&)'