From fc946275b56558f1755011e17b8813a27911bee7 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 23 Sep 2025 21:45:59 +0800 Subject: [PATCH] [meta.member] Properly introduce intended implicit conversion Previously, the `static_assert` the example failed due to deduction failure but not `false` results. This PR makes the template arguments fully specified, which allows intended implicit conversion. --- source/meta.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index e848e048f8..017fffdb77 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2800,15 +2800,15 @@ static_assert( is_pointer_interconvertible_with_class( &C::b ) ); // Succeeds because, despite its appearance, \tcode{\&C::b} has type // ``pointer to member of \tcode{B} of type \tcode{int}''. -static_assert( is_pointer_interconvertible_with_class( &C::b ) ); - // Forces the use of class \tcode{C}, and fails. +static_assert( !is_pointer_interconvertible_with_class( &C::b ) ); + // Forces the use of class \tcode{C}, and the result is \tcode{false}. static_assert( is_corresponding_member( &C::a, &C::b ) ); // Succeeds because, despite its appearance, \tcode{\&C::a} and \tcode{\&C::b} have types // ``pointer to member of \tcode{A} of type \tcode{int}'' and // ``pointer to member of \tcode{B} of type \tcode{int}'', respectively. -static_assert( is_corresponding_member( &C::a, &C::b ) ); - // Forces the use of class \tcode{C}, and fails. +static_assert( !is_corresponding_member( &C::a, &C::b ) ); + // Forces the use of class \tcode{C}, and the result is \tcode{false}. \end{codeblock} \end{example} \end{note}