File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,10 @@ namespace std {
438438 constexpr strong_ordering strong_ordering::equal = {0 };
439439 constexpr strong_ordering strong_ordering::greater = {1 };
440440 constexpr strong_ordering strong_ordering::less = {-1 };
441+
442+ template <typename T> constexpr __remove_reference_t (T)&& move(T&& t) noexcept {
443+ return static_cast <__remove_reference_t (T)&&>(t);
444+ }
441445}
442446
443447namespace operators_deduction {
@@ -965,3 +969,20 @@ void f();
965969};
966970void a::f (this auto ) {} // expected-error {{an explicit object parameter cannot appear in a non-member function}}
967971}
972+
973+ namespace GH100341 {
974+ struct X {
975+ X () = default ;
976+ X (X&&) = default ;
977+ void operator ()(this X);
978+ };
979+
980+ void fail () {
981+ X ()();
982+ [x = X{}](this auto ) {}();
983+ }
984+ void pass () {
985+ std::move (X ())();
986+ std::move ([x = X{}](this auto ) {})();
987+ }
988+ } // namespace GH100341
You can’t perform that action at this time.
0 commit comments