[libcxx] r300218 - Implement LWG#2855 - made easy by previous refactoring
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 13 09:57:42 PDT 2017
Author: marshall
Date: Thu Apr 13 11:57:42 2017
New Revision: 300218
URL: http://llvm.org/viewvc/llvm-project?rev=300218&view=rev
Log:
Implement LWG#2855 - made easy by previous refactoring
Modified:
libcxx/trunk/include/exception
libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
libcxx/trunk/www/cxx1z_status.html
Modified: libcxx/trunk/include/exception
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=300218&r1=300217&r2=300218&view=diff
==============================================================================
--- libcxx/trunk/include/exception (original)
+++ libcxx/trunk/include/exception Thu Apr 13 11:57:42 2017
@@ -243,8 +243,8 @@ throw_with_nested (_Tp& __t)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- typedef typename remove_reference<_Tp>::type _Up;
-// static_assert( is_copy_constructible<_Up>::value, "");
+ typedef typename decay<_Tp>::type _Up;
+ static_assert( is_copy_constructible<_Up>::value, "type thrown must be CopyConstructible");
__throw_with_nested<_Tp, _Up,
is_class<_Up>::value &&
!is_base_of<nested_exception, _Up>::value &&
Modified: libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp?rev=300218&r1=300217&r2=300218&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp Thu Apr 13 11:57:42 2017
@@ -107,6 +107,16 @@ int main()
assert(i == 7);
}
}
+ {
+ try
+ {
+ std::throw_with_nested("String literal");
+ assert(false);
+ }
+ catch (const char * s)
+ {
+ }
+ }
#if TEST_STD_VER > 11
{
try
Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=300218&r1=300217&r2=300218&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Thu Apr 13 11:57:42 2017
@@ -463,7 +463,7 @@
<tr><td><a href="http://wg21.link/LWG2842">2842</a></td><td>in_place_t check for optional::optional(U&&) should decay U</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2850">2850</a></td><td>std::function move constructor does unnecessary work</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2853">2853</a></td><td>Possible inconsistency in specification of erase in [vector.modifiers]</td><td>Kona</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2855">2855</a></td><td>std::throw_with_nested("string_literal")</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2855">2855</a></td><td>std::throw_with_nested("string_literal")</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2857">2857</a></td><td>{variant,optional,any}::emplace should return the constructed value</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2861">2861</a></td><td>basic_string should require that charT match traits::char_type</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2866">2866</a></td><td>Incorrect derived classes constraints</td><td>Kona</td><td></td></tr>
@@ -489,7 +489,7 @@
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 11-Apr-2017</p>
+ <p>Last Updated: 13-Apr-2017</p>
</div>
</body>
</html>
More information about the cfe-commits
mailing list