]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/cp/lambda.c
Implement P0012R1, Make exception specifications part of the type system.
[gcc.git] / gcc / cp / lambda.c
index d4284bfa48b43f5a1681f916107c076dd515d22b..c48cd5201e06ac29c4cdb6656800205932c4d281 100644 (file)
@@ -1029,6 +1029,9 @@ maybe_add_lambda_conv_op (tree type)
   tree stattype = build_function_type (fn_result, FUNCTION_ARG_CHAIN (callop));
   stattype = (cp_build_type_attribute_variant
              (stattype, TYPE_ATTRIBUTES (optype)));
+  if (flag_noexcept_type
+      && TYPE_NOTHROW_P (TREE_TYPE (callop)))
+    stattype = build_exception_variant (stattype, noexcept_true_spec);
 
   /* First build up the conversion op.  */
 
This page took 0.028409 seconds and 5 git commands to generate.