+2018-12-14 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/87814
+ * pt.c (tsubst_exception_specification): Handle
+ DEFERRED_NOEXCEPT with !defer_ok.
+
2018-12-14 Jason Merrill <jason@redhat.com>
PR c++/86823
}
}
else
- new_specs = tsubst_copy_and_build
- (expr, args, complain, in_decl, /*function_p=*/false,
- /*integral_constant_expression_p=*/true);
+ {
+ if (DEFERRED_NOEXCEPT_SPEC_P (specs))
+ {
+ args = add_to_template_args (DEFERRED_NOEXCEPT_ARGS (expr),
+ args);
+ expr = DEFERRED_NOEXCEPT_PATTERN (expr);
+ }
+ new_specs = tsubst_copy_and_build
+ (expr, args, complain, in_decl, /*function_p=*/false,
+ /*integral_constant_expression_p=*/true);
+ }
new_specs = build_noexcept_spec (new_specs, complain);
}
else if (specs)
+2018-12-14 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/87814
+ * g++.dg/cpp1z/pr87814.C: New.
+
2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/cf_check-1.c: New test.
--- /dev/null
+// { dg-do compile { target c++17 } }
+
+template<class Element>
+struct box {
+ template<class E>
+ constexpr box(E && e)
+ noexcept(noexcept(Element(e)))
+ {}
+};
+
+template<class... Ts>
+struct compressed_tuple_ : box<Ts> ... {
+ template<typename... Args>
+ constexpr compressed_tuple_(Args &&... args)
+ noexcept((noexcept(box<Ts>(args)) && ...))
+ : box<Ts>(args)...
+ {}
+};
+
+struct adaptor_cursor : compressed_tuple_<int*> {
+ using compressed_tuple_::compressed_tuple_;
+};
+
+int main() {
+ (void)noexcept(adaptor_cursor{(int*)0});
+}