ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.06k stars 437 forks source link

GCC 13 build failure #1767

Closed xvitaly closed 1 year ago

xvitaly commented 1 year ago

Build failure when building Telegram Desktop with GCC 13.0.1:

FAILED: Telegram/CMakeFiles/Telegram.dir/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp.o 
/usr/bin/g++ -DCRL_USE_COMMON_QUEUE -DDESKTOP_APP_DISABLE_CRASH_REPORTS -DDESKTOP_APP_USE_PACKAGED -DG_LOG_DOMAIN=\"Telegram\" -DKCOREADDONS_EXPORT="" -DLOTTIE_USE_CACHE -DLOT_BUILD -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_IMPLICIT_QCHAR_CONSTRUCTION -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WAYLANDCOMPOSITOR_LIB -DQT_WIDGETS_LIB -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c -DTDESKTOP_API_ID=611335 -DTDESKTOP_DISABLE_AUTOUPDATE -DTGCALLS_USE_STD_OPTIONAL -I/builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram/Telegram_autogen/include -I/builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles -I/builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram/gen -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/ThirdParty/tgcalls -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/ThirdParty/libtgvoip -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_base -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_rpl -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_crl -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_tl -I/builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram/lib_ui/gen -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_ui -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_ui/emoji_suggestions -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_lottie -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_webrtc -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_spellcheck -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_storage -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_qr -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/lib_webview -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/payments -I/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/ThirdParty/rlottie/inc -isystem /usr/include/minizip -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtCore/6.4.2 -isystem /usr/include/qt6/QtCore/6.4.2/QtCore -isystem /usr/include/qt6/QtCore5Compat -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtGui/6.4.2 -isystem /usr/include/qt6/QtGui/6.4.2/QtGui -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtWidgets/6.4.2 -isystem /usr/include/qt6/QtWidgets/6.4.2/QtWidgets -isystem /usr/include/qt6/QtOpenGLWidgets -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtSvg -isystem /usr/include/qt6/QtDBus -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/qt6/QtQuickWidgets -isystem /usr/include/qt6/QtWaylandCompositor -isystem /usr/share -isystem /builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/ThirdParty/kcoreaddons/src/lib/io -isystem /builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/ThirdParty/kcoreaddons/src/lib/util -isystem /builddir/build/BUILD/tdesktop-4.6.0-full/cmake/external/kcoreaddons/headers/public -isystem /usr/include/giomm-2.68 -isystem /usr/lib64/giomm-2.68/include -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/sysprof-4 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/glibmm-2.68 -isystem /usr/lib64/glibmm-2.68/include -isystem /usr/include/sigc++-3.0 -isystem /usr/lib64/sigc++-3.0/include -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/compat-ffmpeg4 -isystem /usr/include/AL -isystem /usr/include/qrcodegencpp -O2 -flto=auto -ffat-lto-objects -fexceptions -g1 -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -fPIC -fno-strict-aliasing -pipe -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated -Wno-deprecated-declarations -pthread -std=gnu++20 -Winvalid-pch -include /builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram/CMakeFiles/Telegram.dir/cmake_pch.hxx -MD -MT Telegram/CMakeFiles/Telegram.dir/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp.o -MF Telegram/CMakeFiles/Telegram.dir/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp.o.d -o Telegram/CMakeFiles/Telegram.dir/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp.o -c /builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp: In function 'auto {anonymous}::NestedRestrictionLabelsList(Data::RestrictionsSetOptions)':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:80:39: error: no match for call to '(const ranges::remove_fn) (std::vector<RestrictionLabel>&, ChatRestriction, ChatRestrictions RestrictionLabel::*)'
   80 |                         ranges::remove(
      |                         ~~~~~~~~~~~~~~^
   81 |                                 second,
      |                                 ~~~~~~~
   82 |                                 Flag::CreateTopics,
      |                                 ~~~~~~~~~~~~~~~~~~~
   83 |                                 &RestrictionLabel::flags),
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/range/v3/range_fwd.hpp:25,
                 from /usr/include/range/v3/action/action.hpp:21,
                 from /usr/include/range/v3/action.hpp:17,
                 from /usr/include/range/v3/all.hpp:17,
                 from /builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/stdafx.h:103,
                 from /builddir/build/BUILD/tdesktop-4.6.0-full/redhat-linux-build/Telegram/CMakeFiles/Telegram.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/range/v3/algorithm/remove.hpp:44:21: note: candidate: 'template<class I, class S, class T, class P>  requires (permutable<I>) && (sentinel_for<S, I>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P>::apply<I>, const T*>) constexpr I ranges::remove_fn::operator()(I, S, const T&, P) const'
   44 |         constexpr I RANGES_FUNC(remove)(I first, S last, T const & val, P proj = P{})
      |                     ^~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:44:21: note:   template argument deduction/substitution failed:
/usr/include/range/v3/algorithm/remove.hpp:44:21: note: constraints not satisfied
In file included from /usr/include/range/v3/range_fwd.hpp:22:
/usr/include/range/v3/iterator/concepts.hpp: In substitution of 'template<class I, class S, class T, class P>  requires (permutable<I>) && (sentinel_for<S, I>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P>::apply<I>, const T*>) constexpr I ranges::remove_fn::operator()(I, S, const T&, P) const [with I = std::vector<RestrictionLabel>; S = ChatRestriction; T = base::flags<ChatRestriction> RestrictionLabel::*; P = ranges::identity]':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:80:18:   required from here
/usr/include/range/v3/iterator/concepts.hpp:250:5:   required for the satisfaction of 'weakly_incrementable_requires_<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:268:17:   required for the satisfaction of 'weakly_incrementable<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:299:17:   required for the satisfaction of 'input_or_output_iterator<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:362:17:   required for the satisfaction of 'input_iterator<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:370:17:   required for the satisfaction of 'forward_iterator<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:840:17:   required for the satisfaction of 'permutable<I>' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:250:5:   in requirements with 'I i' [with I = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:250:5: note: the required expression '(((++ i), (i ++)), requires_<same_as<I&, decltype (++ i)> >)' is invalid
  250 |     CPP_requires(weakly_incrementable_,
      |     ^~~~~~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
/usr/include/range/v3/algorithm/remove.hpp:66:9: note: candidate: 'template<class Rng, class T, class P>  requires (forward_range<Rng>) && (permutable<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>, const T*>) constexpr ranges::borrowed_iterator_t<Rng> ranges::remove_fn::operator()(Rng&&, const T&, P) const'
   66 |         RANGES_FUNC(remove)(Rng && rng, T const & val, P proj = P{})
      |         ^~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:66:9: note:   template argument deduction/substitution failed:
/usr/include/range/v3/algorithm/remove.hpp:66:9: note: constraints not satisfied
/usr/include/range/v3/functional/concepts.hpp: In substitution of 'template<class Rng, class T, class P>  requires (forward_range<Rng>) && (permutable<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>, const T*>) constexpr ranges::borrowed_iterator_t<Rng> ranges::remove_fn::operator()(Rng&&, const T&, P) const [with Rng = std::vector<RestrictionLabel>&; T = ChatRestriction; P = base::flags<ChatRestriction> RestrictionLabel::*]':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:80:18:   required from here
/usr/include/range/v3/functional/concepts.hpp:40:5:   required for the satisfaction of 'invocable_requires_<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatRestriction>&, ChatRestriction&}]
/usr/include/range/v3/functional/concepts.hpp:48:17:   required for the satisfaction of 'invocable<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatRestriction>&, ChatRestriction&}]
/usr/include/range/v3/functional/concepts.hpp:55:17:   required for the satisfaction of 'regular_invocable<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatRestriction>&, ChatRestriction&}]
/usr/include/range/v3/functional/concepts.hpp:73:17:   required for the satisfaction of 'predicate<R, T, U>' [with R = ranges::equal_to&; T = base::flags<ChatRestriction>&; U = ChatRestriction&]
/usr/include/range/v3/functional/concepts.hpp:80:17:   required for the satisfaction of 'relation<F&, typename ranges::indirectly_readable_traits<typename std::remove_cv<meta::_t<std::remove_reference<_Arg> > >::type>::value_type&, typename ranges::indirectly_readable_traits<typename std::remove_cv<meta::_t<std::remove_reference<_Arg> > >::type>::value_type&>' [with F = ranges::equal_to; I1 = ranges::detail::projected_<__gnu_cxx::__normal_iterator<RestrictionLabel*, std::vector<RestrictionLabel, std::allocator<RestrictionLabel> > >, base::flags<ChatRestriction> RestrictionLabel::*>::type; I2 = const ChatRestriction*]
/usr/include/range/v3/iterator/concepts.hpp:658:5:   required for the satisfaction of 'indirect_relation_concept_<F, I1, I2>' [with F = ranges::equal_to; I1 = ranges::detail::projected_<__gnu_cxx::__normal_iterator<RestrictionLabel*, std::vector<RestrictionLabel, std::allocator<RestrictionLabel> > >, base::flags<ChatRestriction> RestrictionLabel::*>::type; I2 = const ChatRestriction*]
/usr/include/range/v3/iterator/concepts.hpp:670:17:   required for the satisfaction of 'indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype (ranges::_::begin(static_cast<Rng& (*)() noexcept>(nullptr)()))>, const T*>' [with P = base::flags<ChatRestriction> RestrictionLabel::*; Rng = std::vector<RestrictionLabel, std::allocator<RestrictionLabel> >&; T = ChatRestriction]
/usr/include/range/v3/functional/concepts.hpp:40:5:   in requirements with 'Fun&& fn' [with Fun = ranges::equal_to&; Args = {base::flags<ChatRestriction>&, ChatRestriction&}]
/usr/include/range/v3/functional/concepts.hpp:40:5: note: the required expression 'ranges::invoke((Fun&&)(fn), (declval<Args>)()...)' is invalid
   40 |     CPP_requires(invocable_,
      |     ^~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp: In function 'std::vector<AdminRightLabel> AdminRightLabels(Data::AdminRightsSetOptions)':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:1003:47: error: no match for call to '(const ranges::remove_fn) (std::vector<AdminRightLabel>&, ChatAdminRight, ChatAdminRights AdminRightLabel::*)'
 1003 |                                 ranges::remove(
      |                                 ~~~~~~~~~~~~~~^
 1004 |                                         result,
      |                                         ~~~~~~~
 1005 |                                         Flag::ManageTopics,
      |                                         ~~~~~~~~~~~~~~~~~~~
 1006 |                                         &AdminRightLabel::flags),
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:44:21: note: candidate: 'template<class I, class S, class T, class P>  requires (permutable<I>) && (sentinel_for<S, I>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P>::apply<I>, const T*>) constexpr I ranges::remove_fn::operator()(I, S, const T&, P) const'
   44 |         constexpr I RANGES_FUNC(remove)(I first, S last, T const & val, P proj = P{})
      |                     ^~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:44:21: note:   template argument deduction/substitution failed:
/usr/include/range/v3/algorithm/remove.hpp:44:21: note: constraints not satisfied
/usr/include/range/v3/iterator/concepts.hpp: In substitution of 'template<class I, class S, class T, class P>  requires (permutable<I>) && (sentinel_for<S, I>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P>::apply<I>, const T*>) constexpr I ranges::remove_fn::operator()(I, S, const T&, P) const [with I = std::vector<AdminRightLabel>; S = ChatAdminRight; T = base::flags<ChatAdminRight> AdminRightLabel::*; P = ranges::identity]':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:1003:19:   required from here
/usr/include/range/v3/iterator/concepts.hpp:250:5:   required for the satisfaction of 'weakly_incrementable_requires_<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:268:17:   required for the satisfaction of 'weakly_incrementable<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:299:17:   required for the satisfaction of 'input_or_output_iterator<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:362:17:   required for the satisfaction of 'input_iterator<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:370:17:   required for the satisfaction of 'forward_iterator<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:840:17:   required for the satisfaction of 'permutable<I>' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:250:5:   in requirements with 'I i' [with I = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >]
/usr/include/range/v3/iterator/concepts.hpp:250:5: note: the required expression '(((++ i), (i ++)), requires_<same_as<I&, decltype (++ i)> >)' is invalid
  250 |     CPP_requires(weakly_incrementable_,
      |     ^~~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:66:9: note: candidate: 'template<class Rng, class T, class P>  requires (forward_range<Rng>) && (permutable<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>, const T*>) constexpr ranges::borrowed_iterator_t<Rng> ranges::remove_fn::operator()(Rng&&, const T&, P) const'
   66 |         RANGES_FUNC(remove)(Rng && rng, T const & val, P proj = P{})
      |         ^~~~~~~~~~~
/usr/include/range/v3/algorithm/remove.hpp:66:9: note:   template argument deduction/substitution failed:
/usr/include/range/v3/algorithm/remove.hpp:66:9: note: constraints not satisfied
/usr/include/range/v3/functional/concepts.hpp: In substitution of 'template<class Rng, class T, class P>  requires (forward_range<Rng>) && (permutable<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>) && (indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype(ranges::_::begin(static_cast<Rng& (*)()noexcept (true)>(nullptr)()))>, const T*>) constexpr ranges::borrowed_iterator_t<Rng> ranges::remove_fn::operator()(Rng&&, const T&, P) const [with Rng = std::vector<AdminRightLabel>&; T = ChatAdminRight; P = base::flags<ChatAdminRight> AdminRightLabel::*]':
/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:1003:19:   required from here
/usr/include/range/v3/functional/concepts.hpp:40:5:   required for the satisfaction of 'invocable_requires_<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatAdminRight>&, ChatAdminRight&}]
/usr/include/range/v3/functional/concepts.hpp:48:17:   required for the satisfaction of 'invocable<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatAdminRight>&, ChatAdminRight&}]
/usr/include/range/v3/functional/concepts.hpp:55:17:   required for the satisfaction of 'regular_invocable<Fun, Args ...>' [with Fun = ranges::equal_to&; Args = {base::flags<ChatAdminRight>&, ChatAdminRight&}]
/usr/include/range/v3/functional/concepts.hpp:73:17:   required for the satisfaction of 'predicate<R, T, U>' [with R = ranges::equal_to&; T = base::flags<ChatAdminRight>&; U = ChatAdminRight&]
/usr/include/range/v3/functional/concepts.hpp:80:17:   required for the satisfaction of 'relation<F&, typename ranges::indirectly_readable_traits<typename std::remove_cv<meta::_t<std::remove_reference<_Arg> > >::type>::value_type&, typename ranges::indirectly_readable_traits<typename std::remove_cv<meta::_t<std::remove_reference<_Arg> > >::type>::value_type&>' [with F = ranges::equal_to; I1 = ranges::detail::projected_<__gnu_cxx::__normal_iterator<AdminRightLabel*, std::vector<AdminRightLabel, std::allocator<AdminRightLabel> > >, base::flags<ChatAdminRight> AdminRightLabel::*>::type; I2 = const ChatAdminRight*]
/usr/include/range/v3/iterator/concepts.hpp:658:5:   required for the satisfaction of 'indirect_relation_concept_<F, I1, I2>' [with F = ranges::equal_to; I1 = ranges::detail::projected_<__gnu_cxx::__normal_iterator<AdminRightLabel*, std::vector<AdminRightLabel, std::allocator<AdminRightLabel> > >, base::flags<ChatAdminRight> AdminRightLabel::*>::type; I2 = const ChatAdminRight*]
/usr/include/range/v3/iterator/concepts.hpp:670:17:   required for the satisfaction of 'indirect_relation<ranges::equal_to, typename ranges::detail::select_projected_<P1>::apply<decltype (ranges::_::begin(static_cast<Rng& (*)() noexcept>(nullptr)()))>, const T*>' [with P = base::flags<ChatAdminRight> AdminRightLabel::*; Rng = std::vector<AdminRightLabel, std::allocator<AdminRightLabel> >&; T = ChatAdminRight]
/usr/include/range/v3/functional/concepts.hpp:40:5:   in requirements with 'Fun&& fn' [with Fun = ranges::equal_to&; Args = {base::flags<ChatAdminRight>&, ChatAdminRight&}]
/usr/include/range/v3/functional/concepts.hpp:40:5: note: the required expression 'ranges::invoke((Fun&&)(fn), (declval<Args>)()...)' is invalid
   40 |     CPP_requires(invocable_,
      |     ^~~~~~~~~~~~

OS: Fedora Linux range-v3 version: 0.12.0 Compiler: GCC 13.0.1

brevzin commented 1 year ago

Can you provide some kind of reproducible example here?

brevzin commented 1 year ago

Well the first one here is just a bug in the application

/builddir/build/BUILD/tdesktop-4.6.0-full/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp:80:39: error: no match for call to '(const ranges::remove_fn) (std::vector<RestrictionLabel>&, ChatRestriction, ChatRestrictions RestrictionLabel::*)'
   80 |                         ranges::remove(
      |                         ~~~~~~~~~~~~~~^
   81 |                                 second,
      |                                 ~~~~~~~
   82 |                                 Flag::CreateTopics,
      |                                 ~~~~~~~~~~~~~~~~~~~
   83 |                                 &RestrictionLabel::flags),
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~

You're calling remove on a vector<RestrictionLabel>, removing a ChatRestriction, &RestrictionLabel::flags here is a ChatRestrictions (plural) not ChatRestriction (singular), and they don't compare.

This is probably not a range-v3 issue.