@@ -1203,10 +1203,10 @@ build_noexcept_spec (tree expr, int complain)
it until instantiation. */
if (!processing_template_decl)
{
- expr = cxx_constant_value (expr);
expr = perform_implicit_conversion_flags (boolean_type_node, expr,
complain,
LOOKUP_NORMAL);
+ expr = cxx_constant_value (expr);
}
if (expr == boolean_true_node)
return noexcept_true_spec;
new file mode 100644
@@ -0,0 +1,15 @@
+// { dg-options -std=c++0x }
+
+struct booleable {
+ bool data;
+ constexpr explicit operator bool() { return data; }
+};
+
+constexpr booleable truthy_func() { return {true}; }
+
+void funky() noexcept(truthy_func()) {}
+
+int main() {
+ funky();
+ return 0;
+}