return error_mark_node;
compound_literal = reshape_init (type, compound_literal, complain);
if (SCALAR_TYPE_P (type)
- && !BRACE_ENCLOSED_INITIALIZER_P (compound_literal))
- {
- tree t = instantiate_non_dependent_expr_sfinae (compound_literal,
- complain);
- if (!check_narrowing (type, t, complain))
- return error_mark_node;
- }
+ && !BRACE_ENCLOSED_INITIALIZER_P (compound_literal)
+ && !check_narrowing (type, compound_literal, complain))
+ return error_mark_node;
if (TREE_CODE (type) == ARRAY_TYPE
&& TYPE_DOMAIN (type) == NULL_TREE)
{
--- /dev/null
+// PR c++/104565
+// { dg-do compile { target c++11 } }
+
+struct apa {
+ constexpr int n() const { return 3; }
+};
+
+template<class>
+int f() {
+ apa foo;
+ return int{foo.n()}; // no matching function for call to 'apa::n(apa*)'
+}