[libcxx-commits] [PATCH] D121528: [libcxx] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI.

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 12 08:58:15 PST 2022


jloser created this revision.
jloser added reviewers: ldionne, var-const, philnik, Mordante.
Herald added a subscriber: arichardson.
Herald added a project: All.
jloser requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

All supported compilers that support C++20 now support concepts. So, remove
`_LIB_LIBCPP_HAS_NO_CONCEPTS` in favor of `_LIBCPP_STD_VER > 17`. Similarly in
the tests, remove `// UNSUPPORTED: libcpp-no-concepts`.

Note that some #if seem to be incorrect prior to this change for some result
types in `__algorithm`. They are self-inconsistent of whether to guard on
concepts, ranges, etc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121528

Files:
  libcxx/include/__algorithm/in_found_result.h
  libcxx/include/__algorithm/in_fun_result.h
  libcxx/include/__algorithm/in_in_out_result.h
  libcxx/include/__algorithm/in_in_result.h
  libcxx/include/__algorithm/in_out_out_result.h
  libcxx/include/__algorithm/in_out_result.h
  libcxx/include/__algorithm/min_max_result.h
  libcxx/include/__algorithm/ranges_max_element.h
  libcxx/include/__algorithm/ranges_min_element.h
  libcxx/include/__algorithm/ranges_mismatch.h
  libcxx/include/__algorithm/ranges_swap_ranges.h
  libcxx/include/__bit/byteswap.h
  libcxx/include/__compare/compare_partial_order_fallback.h
  libcxx/include/__compare/compare_strong_order_fallback.h
  libcxx/include/__compare/compare_three_way.h
  libcxx/include/__compare/compare_weak_order_fallback.h
  libcxx/include/__compare/partial_order.h
  libcxx/include/__compare/strong_order.h
  libcxx/include/__compare/synth_three_way.h
  libcxx/include/__compare/three_way_comparable.h
  libcxx/include/__compare/weak_order.h
  libcxx/include/__concepts/arithmetic.h
  libcxx/include/__concepts/assignable.h
  libcxx/include/__concepts/boolean_testable.h
  libcxx/include/__concepts/class_or_enum.h
  libcxx/include/__concepts/common_reference_with.h
  libcxx/include/__concepts/common_with.h
  libcxx/include/__concepts/constructible.h
  libcxx/include/__concepts/convertible_to.h
  libcxx/include/__concepts/copyable.h
  libcxx/include/__concepts/derived_from.h
  libcxx/include/__concepts/destructible.h
  libcxx/include/__concepts/different_from.h
  libcxx/include/__concepts/equality_comparable.h
  libcxx/include/__concepts/invocable.h
  libcxx/include/__concepts/movable.h
  libcxx/include/__concepts/predicate.h
  libcxx/include/__concepts/regular.h
  libcxx/include/__concepts/relation.h
  libcxx/include/__concepts/same_as.h
  libcxx/include/__concepts/semiregular.h
  libcxx/include/__concepts/swappable.h
  libcxx/include/__concepts/totally_ordered.h
  libcxx/include/__config
  libcxx/include/__filesystem/directory_iterator.h
  libcxx/include/__filesystem/recursive_directory_iterator.h
  libcxx/include/__format/format_arg.h
  libcxx/include/__format/format_args.h
  libcxx/include/__format/format_context.h
  libcxx/include/__format/format_fwd.h
  libcxx/include/__format/format_parse_context.h
  libcxx/include/__format/format_string.h
  libcxx/include/__format/format_to_n_result.h
  libcxx/include/__format/formatter.h
  libcxx/include/__format/formatter_bool.h
  libcxx/include/__format/formatter_char.h
  libcxx/include/__format/formatter_floating_point.h
  libcxx/include/__format/formatter_integer.h
  libcxx/include/__format/formatter_integral.h
  libcxx/include/__format/formatter_pointer.h
  libcxx/include/__format/formatter_string.h
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__functional/ranges_operations.h
  libcxx/include/__iterator/advance.h
  libcxx/include/__iterator/common_iterator.h
  libcxx/include/__iterator/concepts.h
  libcxx/include/__iterator/counted_iterator.h
  libcxx/include/__iterator/distance.h
  libcxx/include/__iterator/incrementable_traits.h
  libcxx/include/__iterator/indirectly_comparable.h
  libcxx/include/__iterator/insert_iterator.h
  libcxx/include/__iterator/iter_move.h
  libcxx/include/__iterator/iter_swap.h
  libcxx/include/__iterator/iterator_traits.h
  libcxx/include/__iterator/mergeable.h
  libcxx/include/__iterator/next.h
  libcxx/include/__iterator/permutable.h
  libcxx/include/__iterator/prev.h
  libcxx/include/__iterator/projected.h
  libcxx/include/__iterator/readable_traits.h
  libcxx/include/__iterator/reverse_iterator.h
  libcxx/include/__iterator/sortable.h
  libcxx/include/__iterator/unreachable_sentinel.h
  libcxx/include/__memory/concepts.h
  libcxx/include/__memory/ranges_construct_at.h
  libcxx/include/__memory/ranges_uninitialized_algorithms.h
  libcxx/include/__random/uniform_random_bit_generator.h
  libcxx/include/__ranges/access.h
  libcxx/include/__ranges/all.h
  libcxx/include/__ranges/common_view.h
  libcxx/include/__ranges/concepts.h
  libcxx/include/__ranges/copyable_box.h
  libcxx/include/__ranges/counted.h
  libcxx/include/__ranges/dangling.h
  libcxx/include/__ranges/data.h
  libcxx/include/__ranges/drop_view.h
  libcxx/include/__ranges/empty.h
  libcxx/include/__ranges/empty_view.h
  libcxx/include/__ranges/enable_borrowed_range.h
  libcxx/include/__ranges/enable_view.h
  libcxx/include/__ranges/iota_view.h
  libcxx/include/__ranges/join_view.h
  libcxx/include/__ranges/non_propagating_cache.h
  libcxx/include/__ranges/owning_view.h
  libcxx/include/__ranges/range_adaptor.h
  libcxx/include/__ranges/rbegin.h
  libcxx/include/__ranges/ref_view.h
  libcxx/include/__ranges/rend.h
  libcxx/include/__ranges/reverse_view.h
  libcxx/include/__ranges/single_view.h
  libcxx/include/__ranges/size.h
  libcxx/include/__ranges/subrange.h
  libcxx/include/__ranges/take_view.h
  libcxx/include/__ranges/transform_view.h
  libcxx/include/__ranges/view_interface.h
  libcxx/include/__utility/cmp.h
  libcxx/include/__utility/pair.h
  libcxx/include/format
  libcxx/include/numbers
  libcxx/include/span
  libcxx/include/string_view
  libcxx/include/tuple
  libcxx/include/type_traits
  libcxx/include/version
  libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp
  libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp
  libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp
  libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp
  libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.concepts/iterator.concept.random.access/subsumption.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/locale_dependent.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/integer_like.compile.pass.cpp
  libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.verify.cpp
  libcxx/test/libcxx/ranges/range.access/end.incomplete_type.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
  libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp
  libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp
  libcxx/test/libcxx/ranges/range.utility.helpers/different_from.compile.pass.cpp
  libcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp
  libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
  libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
  libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
  libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_char.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_floating_point.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_pointer.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string_non_unicode.pass.cpp
  libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_string_unicode.pass.cpp
  libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
  libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
  libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_out_result.compile.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
  libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.equiv/equivalence_relation.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.equiv/equivalence_relation.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.equiv/equivalence_relation.subsumption.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.equiv/equivalence_relation.subsumption.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.predicate/predicate.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.predicate/predicate.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.predicate/predicate.subsumption.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.predicate/predicate.subsumption.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.relation/relation.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.relation/relation.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.relation/relation.subsumption.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.relation/relation.subsumption.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.strictweakorder/strict_weak_order.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.strictweakorder/strict_weak_order.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.strictweakorder/strict_weak_order.subsumption.compile.pass.cpp
  libcxx/test/std/concepts/concepts.callable/concept.strictweakorder/strict_weak_order.subsumption.pass.cpp
  libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
  libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
  libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.constructible/constructible_from.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.convertible/convertible_to.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.copyconstructible/copy_constructible.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
  libcxx/test/std/concepts/concepts.lang/concept.derived/derived_from.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.destructible/destructible.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.moveconstructible/move_constructible.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.same/same_as.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concept.swappable/swappable_with.compile.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concepts.arithmetic/floating_point.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concepts.arithmetic/integral.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concepts.arithmetic/signed_integral.pass.cpp
  libcxx/test/std/concepts/concepts.lang/concepts.arithmetic/unsigned_integral.pass.cpp
  libcxx/test/std/concepts/concepts.object/copyable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp
  libcxx/test/std/concepts/concepts.object/regular.compile.pass.cpp
  libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp
  libcxx/test/std/containers/associative/map/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multimap/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multiset/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/set/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/array/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/deque/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/list/iterator_concept_conformance.compile.pass.cpp
  libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
  (459 more files...)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121528.414853.patch
Type: text/x-patch
Size: 451719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220312/cdbd510e/attachment-0001.bin>


More information about the libcxx-commits mailing list