[Bug 271931] The C++20 feature 'std::ranges::copy' is missing
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 271931] The C++20 feature 'std::ranges::copy' is missing"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Jun 2023 03:56:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271931 --- Comment #3 from Mark Millard <marklmi26-fbsd@yahoo.com> --- Trying for some slight useful information this time: When I look in /usr/include/c++/v1/algorithm I see: . . . #include <__algorithm/ranges_copy.h> . . . Looking there: . . . #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) _LIBCPP_BEGIN_NAMESPACE_STD namespace ranges { template <class _InIter, class _OutIter> using copy_result = in_out_result<_InIter, _OutIter>; namespace __copy { . . . } // namespace __copy inline namespace __cpo { inline constexpr auto copy = __copy::__fn{}; } // namespace __cpo } // namespace ranges _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) . . . Thus: # c++ -std=c++2b -pedantic -Wall -Wextra -fexperimental-library ranges_copy.cpp # ./a.out destination contains: 0 1 2 3 4 5 6 7 8 9 odd numbers in destination are: 1 3 5 7 9 from /usr/include/c++/v1/__config having: # if __has_feature(experimental_library) # ifndef _LIBCPP_ENABLE_EXPERIMENTAL # define _LIBCPP_ENABLE_EXPERIMENTAL # endif # endif // Incomplete features get their own specific disabling flags. This makes it // easier to grep for target specific flags once the feature is complete. # if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY) # define _LIBCPP_HAS_NO_INCOMPLETE_FORMAT # define _LIBCPP_HAS_NO_INCOMPLETE_RANGES # endif 15.0.7 likely requires -fexperimental-library for many things to be enabled because of the overall thing being incomplete or known to be partially broken, such as C++20 ranges overall having some parts not sufficiently handled (apparently). -- You are receiving this mail because: You are the assignee for the bug.