From b543765594c5a2f73ff27a96110f7325d2479806 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sun, 12 Dec 2021 00:43:08 +0700 Subject: [PATCH 1/3] The static_cast expression in convertible_to has the wrong operand --- stl/inc/concepts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/concepts b/stl/inc/concepts index 468a71034a8..ba6a34881ef 100644 --- a/stl/inc/concepts +++ b/stl/inc/concepts @@ -41,8 +41,8 @@ concept derived_from = __is_base_of(_Base, _Derived) template concept convertible_to = __is_convertible_to(_From, _To) - && requires(add_rvalue_reference_t<_From> (&_Fn)()) { - static_cast<_To>(_Fn()); + && requires { + static_cast<_To>(declval()); }; template From cf8abfb241d6164993d37a0e0fb83af6994bee9a Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sun, 12 Dec 2021 00:55:13 +0700 Subject: [PATCH 2/3] typo --- stl/inc/concepts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/concepts b/stl/inc/concepts index ba6a34881ef..243000bdae1 100644 --- a/stl/inc/concepts +++ b/stl/inc/concepts @@ -42,7 +42,7 @@ concept derived_from = __is_base_of(_Base, _Derived) template concept convertible_to = __is_convertible_to(_From, _To) && requires { - static_cast<_To>(declval()); + static_cast<_To>(declval<_From>()); }; template From 344ce8e974cdc8787a98c27544b9815b9c8a4a58 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sun, 12 Dec 2021 01:37:48 +0700 Subject: [PATCH 3/3] missing _STD Co-authored-by: Michael Schellenberger Costa --- stl/inc/concepts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/concepts b/stl/inc/concepts index 243000bdae1..98c6e291a98 100644 --- a/stl/inc/concepts +++ b/stl/inc/concepts @@ -42,7 +42,7 @@ concept derived_from = __is_base_of(_Base, _Derived) template concept convertible_to = __is_convertible_to(_From, _To) && requires { - static_cast<_To>(declval<_From>()); + static_cast<_To>(_STD declval<_From>()); }; template