https://bugs.llvm.org/show_bug.cgi?id=34529
Bug ID: 34529
Summary: <system_error> should include a definition for
std::string
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: arthur.j.odw...@gmail.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
=====
#include <system_error>
int main() {
std::error_condition x = std::errc(0);
x.message();
}
=====
prog.cc:7:6: error: implicit instantiation of undefined template
'std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >'
x.message();
^
/opt/wandbox/clang-head/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
1 error generated.
See https://wandbox.org/permlink/jqt5lpC3bEpqysEZ
My understanding is that once I've included <system_error> in my translation
unit, I should be able to call any method of a class defined in <system_error>
without getting weird compiler errors.
GCC/libstdc++ seems to handle this test program just fine.
The workaround is easy; I just #include <string> before trying to use
error_condition::message(). But I feel like I shouldn't have to work around
this; it should Just Work.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs