// PR c++/54191 // { dg-do compile { target c++11 } } struct B {}; struct D : private B {}; template T &&declval(); template()})> constexpr bool test_braced_cast_to_base(int) { return true; } template constexpr bool test_braced_cast_to_base(bool) { return false; } static_assert(!test_braced_cast_to_base(0), ""); template()})> constexpr bool test_braced_cast_to_derived(int) { return true; } template constexpr bool test_braced_cast_to_derived(bool) { return false; } static_assert(!test_braced_cast_to_derived(0), ""); typedef B *PB; template()})> constexpr bool test_braced_cast_to_ptr_to_base(int) { return true; } template constexpr bool test_braced_cast_to_ptr_to_base(bool) { return false; } static_assert(!test_braced_cast_to_ptr_to_base(0), ""); typedef D *PD; template()})> constexpr bool test_braced_cast_to_ptr_to_derived(int) { return true; } template constexpr bool test_braced_cast_to_ptr_to_derived(bool) { return false; } static_assert(!test_braced_cast_to_ptr_to_derived(0), ""); template(declval()))> constexpr bool test_static_cast(int) { return true; } template constexpr bool test_static_cast(bool) { return false; } static_assert(!test_static_cast(0), ""); static_assert(!test_static_cast(0), ""); template(declval()))> constexpr bool test_dynamic_cast(int) { return true; } template constexpr bool test_dynamic_cast(bool) { return false; } static_assert(!test_dynamic_cast(0), ""); static_assert(!test_dynamic_cast(0), ""); int B::*pm = 0; template().*pm)> constexpr bool test_member_ptr_dot(int) { return true; } template constexpr bool test_member_ptr_dot(bool) { return false; } static_assert(!test_member_ptr_dot(0), ""); template()->*pm)> constexpr bool test_member_ptr_arrow(int) { return true; } template constexpr bool test_member_ptr_arrow(bool) { return false; } static_assert(!test_member_ptr_arrow(0), ""); template() < declval())> constexpr bool test_rel_op(int) { return true; } template constexpr bool test_rel_op(bool) { return false; } static_assert(!test_rel_op(0), ""); template() == declval())> constexpr bool test_eq(int) { return true; } template constexpr bool test_eq(bool) { return false; } static_assert(!test_eq(0), ""); template() : declval())> constexpr bool test_cond_op(int) { return true; } template constexpr bool test_cond_op(bool) { return false; } static_assert(!test_cond_op(0), "");