Skip to content

Commit 2be3924

Browse files
frederick-vs-jatkoeppe
authored andcommitted
[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.
1 parent d1f700c commit 2be3924

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/meta.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,15 +2804,15 @@
28042804
static_assert( is_pointer_interconvertible_with_class( &C::b ) );
28052805
// Succeeds because, despite its appearance, \tcode{\&C::b} has type
28062806
// ``pointer to member of \tcode{B} of type \tcode{int}''.
2807-
static_assert( is_pointer_interconvertible_with_class<C>( &C::b ) );
2808-
// Forces the use of class \tcode{C}, and fails.
2807+
static_assert( !is_pointer_interconvertible_with_class<C, int>( &C::b ) );
2808+
// Forces the use of class \tcode{C}, and the result is \tcode{false}.
28092809

28102810
static_assert( is_corresponding_member( &C::a, &C::b ) );
28112811
// Succeeds because, despite its appearance, \tcode{\&C::a} and \tcode{\&C::b} have types
28122812
// ``pointer to member of \tcode{A} of type \tcode{int}'' and
28132813
// ``pointer to member of \tcode{B} of type \tcode{int}'', respectively.
2814-
static_assert( is_corresponding_member<C, C>( &C::a, &C::b ) );
2815-
// Forces the use of class \tcode{C}, and fails.
2814+
static_assert( !is_corresponding_member<C, C, int, int>( &C::a, &C::b ) );
2815+
// Forces the use of class \tcode{C}, and the result is \tcode{false}.
28162816
\end{codeblock}
28172817
\end{example}
28182818
\end{note}

0 commit comments

Comments
 (0)