<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - <system_error> should include a definition for std::string"
href="https://bugs.llvm.org/show_bug.cgi?id=34529">34529</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td><system_error> should include a definition for std::string
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arthur.j.odwyer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>=====
#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 <a href="https://wandbox.org/permlink/jqt5lpC3bEpqysEZ">https://wandbox.org/permlink/jqt5lpC3bEpqysEZ</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>