From: Jonathan Wakely Date: Wed, 16 Jun 2021 11:47:32 +0000 (+0100) Subject: libstdc++: Use named struct for __decay_copy X-Git-Tag: basepoints/gcc-13~6777 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c25e3bf87975280a603ff18fba387c6707ce4a95;p=thirdparty%2Fgcc.git libstdc++: Use named struct for __decay_copy In r12-1486-gcb326a6442f09cb36b05ce556fc91e10bfeb0cf6 I changed __decay_copy to be a function object of unnamed class type. This causes problems when importing the library headers: error: conflicting global module declaration 'constexpr const std::ranges::__cust_access:: std::ranges::__cust_access::__decay_copy' The fix is to use a named struct instead of an anonymous one. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/iterator_concepts.h (__decay_copy): Name type. --- diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h index d18ae32bf20b..11748e5ed7be 100644 --- a/libstdc++-v3/include/bits/iterator_concepts.h +++ b/libstdc++-v3/include/bits/iterator_concepts.h @@ -930,7 +930,8 @@ namespace ranges { using std::__detail::__class_or_enum; - struct { + struct _Decay_copy final + { template constexpr decay_t<_Tp> operator()(_Tp&& __t) const