Implement LWG#2855 - made easy by previous refactoring

llvm-svn: 300218
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 5948e39297f73a90202a397c317b5c0e63a7fcde
diff --git a/include/exception b/include/exception
index b12a4c2..181d604 100644
--- a/include/exception
+++ b/include/exception
@@ -243,8 +243,8 @@
 #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 &&