diff --git a/include/hibf/all.hpp b/include/hibf/all.hpp index 06c05228..d52a1a0d 100644 --- a/include/hibf/all.hpp +++ b/include/hibf/all.hpp @@ -11,7 +11,7 @@ */ /*!\defgroup search_dream_index DREAM Index - * \brief Provides hibf::interleaved_bloom_filter. + * \brief Provides seqan::hibf::interleaved_bloom_filter. * \ingroup search * \see search */ diff --git a/include/hibf/config.hpp b/include/hibf/config.hpp index 87abd64f..24ed511d 100644 --- a/include/hibf/config.hpp +++ b/include/hibf/config.hpp @@ -21,7 +21,7 @@ #include // for access #include // for make_nvp, CEREAL_NVP -namespace hibf +namespace seqan::hibf { using insert_iterator = std::insert_iterator>; @@ -111,4 +111,4 @@ struct config } }; -} // namespace hibf +} // namespace seqan::hibf diff --git a/include/hibf/contrib/aligned_allocator.hpp b/include/hibf/contrib/aligned_allocator.hpp index 8fdf5ecb..36114bc7 100644 --- a/include/hibf/contrib/aligned_allocator.hpp +++ b/include/hibf/contrib/aligned_allocator.hpp @@ -22,7 +22,7 @@ # pragma GCC warning "Non-C++17 compliant compiler! Please open an issue with your compiler and platform!" #endif // __cpp_aligned_new < 201606 -namespace hibf::contrib +namespace seqan::hibf::contrib { /*!\brief Allocates uninitialized storage whose memory-alignment is specified by *alignment*. @@ -151,14 +151,14 @@ class aligned_allocator } /*!\brief Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier call - * to hibf::aligned_allocator::allocate. + * to seqan::hibf::aligned_allocator::allocate. * * \param[in] p The pointer to the memory to be deallocated. * \param[in] n The number of elements to be deallocated. * * \details * - * The argument `n` must be equal to the first argument of the call to hibf::aligned_allocator::allocate that + * The argument `n` must be equal to the first argument of the call to seqan::hibf::aligned_allocator::allocate that * originally produced `p`, otherwise the behavior is undefined. This function calls * [operator delete](https://en.cppreference.com/w/cpp/memory/new/operator_delete) to deallocate the memory of * specified size. @@ -237,4 +237,4 @@ class aligned_allocator //!\} }; -} // namespace hibf::contrib +} // namespace seqan::hibf::contrib diff --git a/include/hibf/contrib/std/all_view.hpp b/include/hibf/contrib/std/all_view.hpp index fee45f49..db31a8d6 100644 --- a/include/hibf/contrib/std/all_view.hpp +++ b/include/hibf/contrib/std/all_view.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std::views::{all, all_t}, and seqan::std::ranges::owning_view. + * \brief Provides seqan::stl::views::{all, all_t}, and seqan::stl::ranges::owning_view. */ // File might be included from multiple libraries. @@ -18,33 +18,33 @@ #if __cpp_lib_ranges >= 202110L -namespace seqan::std::ranges +namespace seqan::stl::ranges { using ::std::ranges::owning_view; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::views +namespace seqan::stl::views { using ::std::ranges::views::all; using ::std::ranges::views::all_t; -} // namespace seqan::std::views +} // namespace seqan::stl::views #else # include "concepts.hpp" # include "detail/adaptor_base.hpp" # include "detail/exposition_only.hpp" -namespace seqan::std::ranges +namespace seqan::stl::ranges { /*!\brief A move-only view that takes unique ownership of a range. * \sa https://en.cppreference.com/w/cpp/ranges/owning_view */ template <::std::ranges::range rng_t> - requires ::std::movable && (!seqan::std::detail::is_initializer_list<::std::remove_cvref_t>) + requires ::std::movable && (!seqan::stl::detail::is_initializer_list<::std::remove_cvref_t>) class owning_view : public ::std::ranges::view_interface> { private: @@ -158,13 +158,13 @@ class owning_view : public ::std::ranges::view_interface> } }; -/*!\brief The functor for seqan::std::views::all. +/*!\brief The functor for seqan::stl::views::all. */ -class all_fn : public seqan::std::detail::adaptor_base +class all_fn : public seqan::stl::detail::adaptor_base { private: //!\brief Befriend the base class. - friend seqan::std::detail::adaptor_base; + friend seqan::stl::detail::adaptor_base; //!\brief Checks whether a type is a view. template @@ -179,7 +179,7 @@ class all_fn : public seqan::std::detail::adaptor_base static constexpr bool valid_for_owning_view = requires { owning_view(::std::declval()); }; public: - using seqan::std::detail::adaptor_base::adaptor_base; + using seqan::stl::detail::adaptor_base::adaptor_base; /*!\brief Returns a view that includes all elements of the range argument. * \sa https://en.cppreference.com/w/cpp/ranges/all_view @@ -191,7 +191,7 @@ class all_fn : public seqan::std::detail::adaptor_base * * A ::std::ranges::ref_view of `rng` if that expression is valid. * * Otherwise, a seqan3::detail::owning_view of `rng`. */ - template + template requires decays_to_view || valid_for_ref_view || valid_for_owning_view static auto impl(rng_t && rng) { @@ -204,21 +204,21 @@ class all_fn : public seqan::std::detail::adaptor_base } }; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::views +namespace seqan::stl::views { /*!\copydoc all_fn::impl */ -inline constexpr auto all = seqan::std::ranges::all_fn{}; +inline constexpr auto all = seqan::stl::ranges::all_fn{}; /*!\brief Returns the type that results from appying seqan3::detail::all to a range. */ -template +template using all_t = decltype(all(::std::declval())); -} // namespace seqan::std::views +} // namespace seqan::stl::views #endif // __cpp_lib_ranges >= 202110L diff --git a/include/hibf/contrib/std/chunk_view.hpp b/include/hibf/contrib/std/chunk_view.hpp index 82f089e4..8657d41c 100644 --- a/include/hibf/contrib/std/chunk_view.hpp +++ b/include/hibf/contrib/std/chunk_view.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std::views::chunk. + * \brief Provides seqan::stl::views::chunk. */ // File might be included from multiple libraries. @@ -18,12 +18,12 @@ #ifdef __cpp_lib_ranges_chunk -namespace seqan::std::views +namespace seqan::stl::views { using ::std::ranges::views::chunk; -} // namespace seqan::std::views +} // namespace seqan::stl::views #else @@ -37,7 +37,7 @@ using ::std::ranges::views::chunk; # include "detail/exposition_only.hpp" # include "detail/non_propagating_cache.hpp" -namespace seqan::std::detail::chunk +namespace seqan::stl::detail::chunk { template @@ -55,9 +55,9 @@ constexpr auto to_unsigned_like(T v) noexcept return static_cast<::std::make_unsigned_t>(v); } -} // namespace seqan::std::detail::chunk +} // namespace seqan::stl::detail::chunk -namespace seqan::std::ranges +namespace seqan::stl::ranges { template <::std::ranges::view V> @@ -74,7 +74,7 @@ SEQAN_STD_NESTED_VISIBILITY ::std::ranges::range_difference_t n_; ::std::ranges::range_difference_t remainder_ = 0; - seqan::std::detail::non_propagating_cache<::std::ranges::iterator_t> current_; + seqan::stl::detail::non_propagating_cache<::std::ranges::iterator_t> current_; private: class outer_iterator; @@ -115,19 +115,19 @@ SEQAN_STD_NESTED_VISIBILITY constexpr auto size() requires ::std::ranges::sized_range { - return seqan::std::detail::chunk::to_unsigned_like( - seqan::std::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); + return seqan::stl::detail::chunk::to_unsigned_like( + seqan::stl::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); } constexpr auto size() const requires ::std::ranges::sized_range { - return seqan::std::detail::chunk::to_unsigned_like( - seqan::std::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); + return seqan::stl::detail::chunk::to_unsigned_like( + seqan::stl::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); } }; template -chunk_view(R &&, ::std::ranges::range_difference_t) -> chunk_view>; +chunk_view(R &&, ::std::ranges::range_difference_t) -> chunk_view>; template <::std::ranges::view V> requires ::std::ranges::input_range @@ -180,7 +180,7 @@ class chunk_view::outer_iterator { return dist == 0 ? 0 : 1; } - return seqan::std::detail::chunk::div_ceil(dist - x.parent_->remainder_, x.parent_->n_) + 1; + return seqan::stl::detail::chunk::div_ceil(dist - x.parent_->remainder_, x.parent_->n_) + 1; } friend constexpr difference_type operator-(outer_iterator const & x, ::std::default_sentinel_t y) requires ::std::sized_sentinel_for<::std::ranges::sentinel_t, ::std::ranges::iterator_t> @@ -214,7 +214,7 @@ struct chunk_view::outer_iterator::value_type : ::std::ranges::view_interface constexpr auto size() const requires ::std::sized_sentinel_for<::std::ranges::sentinel_t, ::std::ranges::iterator_t> { - return seqan::std::detail::chunk::to_unsigned_like( + return seqan::stl::detail::chunk::to_unsigned_like( ::std::ranges::min(parent_->remainder_, ::std::ranges::end(parent_->base_) - *parent_->current_)); } }; @@ -326,7 +326,7 @@ class chunk_view : public ::std::ranges::view_interface> } constexpr auto begin() - requires (!seqan::std::detail::simple_view) + requires (!seqan::stl::detail::simple_view) { return iterator{this, ::std::ranges::begin(base_)}; } @@ -338,7 +338,7 @@ class chunk_view : public ::std::ranges::view_interface> } constexpr auto end() - requires (!seqan::std::detail::simple_view) + requires (!seqan::stl::detail::simple_view) { if constexpr (::std::ranges::common_range && ::std::ranges::sized_range) { @@ -376,14 +376,14 @@ class chunk_view : public ::std::ranges::view_interface> constexpr auto size() requires ::std::ranges::sized_range { - return seqan::std::detail::chunk::to_unsigned_like( - seqan::std::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); + return seqan::stl::detail::chunk::to_unsigned_like( + seqan::stl::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); } constexpr auto size() const requires ::std::ranges::sized_range { - return seqan::std::detail::chunk::to_unsigned_like( - seqan::std::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); + return seqan::stl::detail::chunk::to_unsigned_like( + seqan::stl::detail::chunk::div_ceil(::std::ranges::distance(base_), n_)); } }; @@ -393,8 +393,8 @@ template class chunk_view::iterator { private: - using Parent = seqan::std::detail::maybe_const; - using Base = seqan::std::detail::maybe_const; + using Parent = seqan::stl::detail::maybe_const; + using Base = seqan::stl::detail::maybe_const; ::std::ranges::iterator_t current_ = ::std::ranges::iterator_t{}; ::std::ranges::sentinel_t end_ = ::std::ranges::sentinel_t{}; @@ -575,7 +575,7 @@ class chunk_view::iterator friend constexpr difference_type operator-(::std::default_sentinel_t y, iterator const & x) requires ::std::sized_sentinel_for<::std::ranges::sentinel_t, ::std::ranges::iterator_t> { - return seqan::std::detail::chunk::div_ceil(x.end_ - x.current_, x.n_); + return seqan::stl::detail::chunk::div_ceil(x.end_ - x.current_, x.n_); } friend constexpr difference_type operator-(iterator const & x, ::std::default_sentinel_t y) @@ -590,24 +590,24 @@ struct chunk_fn template constexpr auto operator()(Difference n) const { - return seqan::std::detail::adaptor_from_functor{*this, n}; + return seqan::stl::detail::adaptor_from_functor{*this, n}; } - template > + template > constexpr auto operator()(Range && range, ::std::type_identity_t n) const { return chunk_view{::std::forward(range), n}; } }; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::views +namespace seqan::stl::views { -inline constexpr auto chunk = seqan::std::ranges::chunk_fn{}; +inline constexpr auto chunk = seqan::stl::ranges::chunk_fn{}; -} // namespace seqan::std::views +} // namespace seqan::stl::views #endif // ifdef __cpp_lib_ranges_chunk diff --git a/include/hibf/contrib/std/concepts.hpp b/include/hibf/contrib/std/concepts.hpp index c2456221..aed5614e 100644 --- a/include/hibf/contrib/std/concepts.hpp +++ b/include/hibf/contrib/std/concepts.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std concepts. + * \brief Provides seqan::stl concepts. */ // File might be included from multiple libraries. @@ -17,7 +17,7 @@ #include #if __cpp_lib_ranges >= 202110L -namespace seqan::std::ranges +namespace seqan::stl::ranges { using ::std::ranges::viewable_range; @@ -25,7 +25,7 @@ using ::std::ranges::viewable_range; } #else # include "detail/exposition_only.hpp" -namespace seqan::std::ranges +namespace seqan::stl::ranges { template @@ -35,9 +35,9 @@ concept viewable_range = ::std::ranges::range || (!::std::ranges::view<::std::remove_cvref_t> && (::std::is_lvalue_reference_v || (::std::movable<::std::remove_reference_t> - && !seqan::std::detail::is_initializer_list<::std::remove_cvref_t>)))); + && !seqan::stl::detail::is_initializer_list<::std::remove_cvref_t>)))); -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges #endif diff --git a/include/hibf/contrib/std/detail/adaptor_base.hpp b/include/hibf/contrib/std/detail/adaptor_base.hpp index b80f6f59..b790e29f 100644 --- a/include/hibf/contrib/std/detail/adaptor_base.hpp +++ b/include/hibf/contrib/std/detail/adaptor_base.hpp @@ -6,7 +6,7 @@ // ----------------------------------------------------------------------------------------------------- /*!\file - * \brief Provides seqan::std::detail::adaptor_base and seqan::std::detail::combined_adaptor + * \brief Provides seqan::stl::detail::adaptor_base and seqan::stl::detail::combined_adaptor * \author Hannes Hauswedell */ @@ -17,7 +17,7 @@ #include #include -namespace seqan::std::detail +namespace seqan::stl::detail { // ============================================================================ @@ -210,6 +210,6 @@ class combined_adaptor : //!\} }; -} // namespace seqan::std::detail +} // namespace seqan::stl::detail #endif // SEQAN_STD_DETAIL_ADAPTOR_BASE diff --git a/include/hibf/contrib/std/detail/adaptor_for_view_without_args.hpp b/include/hibf/contrib/std/detail/adaptor_for_view_without_args.hpp index 61ee565e..7a73fe34 100644 --- a/include/hibf/contrib/std/detail/adaptor_for_view_without_args.hpp +++ b/include/hibf/contrib/std/detail/adaptor_for_view_without_args.hpp @@ -6,7 +6,7 @@ // ----------------------------------------------------------------------------------------------------- /*!\file - * \brief Provides seqan::std::detail::adaptor_for_view_without_args + * \brief Provides seqan::stl::detail::adaptor_for_view_without_args * \author Hannes Hauswedell */ @@ -16,7 +16,7 @@ #include "adaptor_base.hpp" -namespace seqan::std::detail +namespace seqan::stl::detail { // ============================================================================ @@ -68,6 +68,6 @@ class adaptor_for_view_without_args : public adaptor_base */ @@ -16,7 +16,7 @@ #include "adaptor_base.hpp" -namespace seqan::std::detail +namespace seqan::stl::detail { // ============================================================================ @@ -70,6 +70,6 @@ class adaptor_from_functor : //!\} }; -} // namespace seqan::std::detail +} // namespace seqan::stl::detail #endif // SEQAN_STD_DETAIL_ADAPTOR_FROM_FUNCTOR diff --git a/include/hibf/contrib/std/detail/compiler_definitions.hpp b/include/hibf/contrib/std/detail/compiler_definitions.hpp index 39aa7877..417205b8 100644 --- a/include/hibf/contrib/std/detail/compiler_definitions.hpp +++ b/include/hibf/contrib/std/detail/compiler_definitions.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides compiler definitions for seqan::std. + * \brief Provides compiler definitions for seqan::stl. */ // File might be included from multiple libraries. diff --git a/include/hibf/contrib/std/detail/exposition_only.hpp b/include/hibf/contrib/std/detail/exposition_only.hpp index 1ff1584a..4dbf6156 100644 --- a/include/hibf/contrib/std/detail/exposition_only.hpp +++ b/include/hibf/contrib/std/detail/exposition_only.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std::detail implementation helper that are used in multiple files. + * \brief Provides seqan::stl::detail implementation helper that are used in multiple files. */ // File might be included from multiple libraries. @@ -16,7 +16,7 @@ #include -namespace seqan::std::detail +namespace seqan::stl::detail { template @@ -33,6 +33,6 @@ concept simple_view = ::std::ranges::view && ::std::ranges::range using maybe_const = ::std::conditional_t; -} // namespace seqan::std::detail +} // namespace seqan::stl::detail #endif // SEQAN_STD_DETAIL_EXPOSITION_ONLY diff --git a/include/hibf/contrib/std/detail/non_propagating_cache.hpp b/include/hibf/contrib/std/detail/non_propagating_cache.hpp index 424dac38..6965fb6c 100644 --- a/include/hibf/contrib/std/detail/non_propagating_cache.hpp +++ b/include/hibf/contrib/std/detail/non_propagating_cache.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides [seqan::std::detail::non_propagating_cache](https://eel.is/c++draft/range.nonprop.cache). + * \brief Provides [seqan::stl::detail::non_propagating_cache](https://eel.is/c++draft/range.nonprop.cache). */ // File might be included from multiple libraries. @@ -16,7 +16,7 @@ #include -namespace seqan::std::detail +namespace seqan::stl::detail { /*!\brief A helper that enables an input view to temporarily cache values as it is iterated over. @@ -78,6 +78,6 @@ class non_propagating_cache : public ::std::optional } }; -} // namespace seqan::std::detail +} // namespace seqan::stl::detail #endif // SEQAN_STD_DETAIL_NON_PROPAGATING_CACHE diff --git a/include/hibf/contrib/std/join_with_view.hpp b/include/hibf/contrib/std/join_with_view.hpp index 25825cdd..c2a6ca4d 100644 --- a/include/hibf/contrib/std/join_with_view.hpp +++ b/include/hibf/contrib/std/join_with_view.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std::views::join_with. + * \brief Provides seqan::stl::views::join_with. */ // File might be included from multiple libraries. @@ -18,12 +18,12 @@ #ifdef __cpp_lib_ranges_join_with -namespace seqan::std::views +namespace seqan::stl::views { using ::std::ranges::views::join_with; -} // namespace seqan::std::views +} // namespace seqan::stl::views #else @@ -36,7 +36,7 @@ using ::std::ranges::views::join_with; # include "detail/exposition_only.hpp" # include "detail/non_propagating_cache.hpp" -namespace seqan::std::detail::join_with +namespace seqan::stl::detail::join_with { template @@ -68,18 +68,18 @@ struct cache_helper non_propagating_cache<::std::remove_cv_t> inner_; }; -} // namespace seqan::std::detail::join_with +} // namespace seqan::stl::detail::join_with -namespace seqan::std::ranges +namespace seqan::stl::ranges { template <::std::ranges::input_range V, ::std::ranges::forward_range Pattern> requires ::std::ranges::view && ::std::ranges::input_range<::std::ranges::range_reference_t> && ::std::ranges::view - && seqan::std::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> + && seqan::stl::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> class join_with_view : public ::std::ranges::view_interface>, - private seqan::std::detail::join_with::cache_helper<::std::ranges::range_reference_t> + private seqan::stl::detail::join_with::cache_helper<::std::ranges::range_reference_t> { private: using InnerRng = ::std::ranges::range_reference_t; @@ -128,8 +128,8 @@ class join_with_view : // the sentinels of the non-const view and const range are the same. // If ::std::is_reference_v, we do not have a cache to store the value. Hence, we do not change // any members and can use the const iterator. - constexpr bool use_const = seqan::std::detail::simple_view && ::std::is_reference_v - && seqan::std::detail::simple_view; + constexpr bool use_const = seqan::stl::detail::simple_view && ::std::is_reference_v + && seqan::stl::detail::simple_view; return iterator{*this, ::std::ranges::begin(base_)}; } @@ -142,7 +142,7 @@ class join_with_view : constexpr auto end() { - constexpr bool is_simple = seqan::std::detail::simple_view && seqan::std::detail::simple_view; + constexpr bool is_simple = seqan::stl::detail::simple_view && seqan::stl::detail::simple_view; if constexpr (::std::ranges::forward_range && ::std::is_reference_v && ::std::ranges::forward_range && ::std::ranges::common_range && ::std::ranges::common_range) @@ -165,25 +165,25 @@ class join_with_view : }; template -join_with_view(R &&, P &&) -> join_with_view, seqan::std::views::all_t

>; +join_with_view(R &&, P &&) -> join_with_view, seqan::stl::views::all_t

>; template <::std::ranges::input_range R> join_with_view(R &&, ::std::ranges::range_value_t<::std::ranges::range_reference_t>) - -> join_with_view, + -> join_with_view, ::std::ranges::single_view<::std::ranges::range_value_t<::std::ranges::range_reference_t>>>; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::detail::join_with +namespace seqan::stl::detail::join_with { template struct helper { - using Parent = seqan::std::detail::maybe_const>; - using Base = seqan::std::detail::maybe_const; + using Parent = seqan::stl::detail::maybe_const>; + using Base = seqan::stl::detail::maybe_const; using InnerBase = ::std::ranges::range_reference_t; - using PatternBase = seqan::std::detail::maybe_const; + using PatternBase = seqan::stl::detail::maybe_const; using OuterIter = ::std::ranges::iterator_t; using InnerIter = ::std::ranges::iterator_t; @@ -237,22 +237,22 @@ template struct iterator_category_t {}; -} // namespace seqan::std::detail::join_with +} // namespace seqan::stl::detail::join_with -namespace seqan::std::ranges +namespace seqan::stl::ranges { template <::std::ranges::input_range V, ::std::ranges::forward_range Pattern> requires ::std::ranges::view && ::std::ranges::input_range<::std::ranges::range_reference_t> && ::std::ranges::view - && seqan::std::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> + && seqan::stl::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> template class join_with_view::iterator : - public seqan::std::detail::join_with:: - iterator_category_t::ref_is_glvalue> + public seqan::stl::detail::join_with:: + iterator_category_t::ref_is_glvalue> { private: - using helper_t = seqan::std::detail::join_with::helper; + using helper_t = seqan::stl::detail::join_with::helper; using Parent = helper_t::Parent; using Base = helper_t::Base; using InnerBase = helper_t::InnerBase; @@ -338,8 +338,8 @@ SEQAN_STD_NESTED_VISIBILITY !ref_is_glvalue, ::std::input_iterator_tag, ::std::conditional_t< - ::std::ranges::bidirectional_range && seqan::std::detail::join_with::bidirectional_common - && seqan::std::detail::join_with::bidirectional_common, + ::std::ranges::bidirectional_range && seqan::stl::detail::join_with::bidirectional_common + && seqan::stl::detail::join_with::bidirectional_common, ::std::bidirectional_iterator_tag, ::std::conditional_t<::std::ranges::forward_range && ::std::ranges::forward_range, ::std::forward_iterator_tag, @@ -405,8 +405,8 @@ SEQAN_STD_NESTED_VISIBILITY constexpr iterator & operator--() requires ref_is_glvalue && ::std::ranges::bidirectional_range - && seqan::std::detail::join_with::bidirectional_common - && seqan::std::detail::join_with::bidirectional_common + && seqan::stl::detail::join_with::bidirectional_common + && seqan::stl::detail::join_with::bidirectional_common { if (outer_it_ == ::std::ranges::end(parent_->base_)) { @@ -456,8 +456,8 @@ SEQAN_STD_NESTED_VISIBILITY constexpr iterator operator--(int) requires ref_is_glvalue && ::std::ranges::bidirectional_range - && seqan::std::detail::join_with::bidirectional_common - && seqan::std::detail::join_with::bidirectional_common + && seqan::stl::detail::join_with::bidirectional_common + && seqan::stl::detail::join_with::bidirectional_common { iterator tmp = *this; --*this; @@ -487,13 +487,13 @@ SEQAN_STD_NESTED_VISIBILITY template <::std::ranges::input_range V, ::std::ranges::forward_range Pattern> requires ::std::ranges::view && ::std::ranges::input_range<::std::ranges::range_reference_t> && ::std::ranges::view - && seqan::std::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> + && seqan::stl::detail::join_with::compatible_joinable_ranges<::std::ranges::range_reference_t, Pattern> template class join_with_view::sentinel { private: - using Parent = seqan::std::detail::maybe_const; - using Base = seqan::std::detail::maybe_const; + using Parent = seqan::stl::detail::maybe_const; + using Base = seqan::stl::detail::maybe_const; ::std::ranges::sentinel_t end_ = ::std::ranges::sentinel_t(); friend class join_with_view; @@ -510,7 +510,7 @@ class join_with_view::sentinel template requires ::std::sentinel_for<::std::ranges::sentinel_t, - ::std::ranges::iterator_t>> + ::std::ranges::iterator_t>> friend constexpr bool operator==(iterator const & x, sentinel const & y) { return x.outer_it_ == y.end_; @@ -522,24 +522,24 @@ struct join_with_fn template constexpr auto operator()(Pattern && pattern) const { - return seqan::std::detail::adaptor_from_functor{*this, ::std::forward(pattern)}; + return seqan::stl::detail::adaptor_from_functor{*this, ::std::forward(pattern)}; } - template + template constexpr auto operator()(urng_t && urange, Pattern && pattern) const { return join_with_view{::std::forward(urange), ::std::forward(pattern)}; } }; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::views +namespace seqan::stl::views { -inline constexpr auto join_with = seqan::std::ranges::join_with_fn{}; +inline constexpr auto join_with = seqan::stl::ranges::join_with_fn{}; -} // namespace seqan::std::views +} // namespace seqan::stl::views #endif // ifdef __cpp_lib_ranges_join_with diff --git a/include/hibf/contrib/std/pair.hpp b/include/hibf/contrib/std/pair.hpp index e6d66f13..6e7dc400 100644 --- a/include/hibf/contrib/std/pair.hpp +++ b/include/hibf/contrib/std/pair.hpp @@ -6,7 +6,7 @@ // ----------------------------------------------------------------------------------------------------- /*!\file - * \brief Provides seqan::std::pair. + * \brief Provides seqan::stl::pair. * \author Enrico Seiler */ @@ -17,16 +17,16 @@ #ifdef __cpp_lib_tuple_like -namespace seqan::std +namespace seqan::stl { using ::std::pair; -} // namespace seqan::std +} // namespace seqan::stl #else -namespace seqan::std +namespace seqan::stl { template @@ -544,124 +544,124 @@ struct pair : public ::std::pair template pair(T1, T2) -> pair; -} // namespace seqan::std +} // namespace seqan::stl namespace std { template -struct tuple_size> : public tuple_size<::std::pair> +struct tuple_size> : public tuple_size<::std::pair> {}; template -struct tuple_element> : public tuple_element> +struct tuple_element> : public tuple_element> {}; template - requires requires { typename seqan::std::pair<::std::common_type_t, ::std::common_type_t>; } -struct common_type, seqan::std::pair> + requires requires { typename seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; } +struct common_type, seqan::stl::pair> { - using type = seqan::std::pair<::std::common_type_t, ::std::common_type_t>; + using type = seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; }; template - requires requires { typename seqan::std::pair<::std::common_type_t, ::std::common_type_t>; } -struct common_type<::std::pair, seqan::std::pair> + requires requires { typename seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; } +struct common_type<::std::pair, seqan::stl::pair> { - using type = seqan::std::pair<::std::common_type_t, ::std::common_type_t>; + using type = seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; }; template - requires requires { typename seqan::std::pair<::std::common_type_t, ::std::common_type_t>; } -struct common_type, ::std::pair> + requires requires { typename seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; } +struct common_type, ::std::pair> { - using type = seqan::std::pair<::std::common_type_t, ::std::common_type_t>; + using type = seqan::stl::pair<::std::common_type_t, ::std::common_type_t>; }; template class TQual, template class UQual> requires requires { - typename seqan::std::pair<::std::common_reference_t, UQual>, + typename seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; } -struct basic_common_reference, seqan::std::pair, TQual, UQual> +struct basic_common_reference, seqan::stl::pair, TQual, UQual> { - using type = seqan::std::pair<::std::common_reference_t, UQual>, + using type = seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; }; template class TQual, template class UQual> requires requires { - typename seqan::std::pair<::std::common_reference_t, UQual>, + typename seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; } -struct basic_common_reference<::std::pair, seqan::std::pair, TQual, UQual> +struct basic_common_reference<::std::pair, seqan::stl::pair, TQual, UQual> { - using type = seqan::std::pair<::std::common_reference_t, UQual>, + using type = seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; }; template class TQual, template class UQual> requires requires { - typename seqan::std::pair<::std::common_reference_t, UQual>, + typename seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; } -struct basic_common_reference, ::std::pair, TQual, UQual> +struct basic_common_reference, ::std::pair, TQual, UQual> { - using type = seqan::std::pair<::std::common_reference_t, UQual>, + using type = seqan::stl::pair<::std::common_reference_t, UQual>, ::std::common_reference_t, UQual>>; }; template <::std::size_t i, class T1, class T2> -constexpr ::std::tuple_element_t> & get(seqan::std::pair & t) noexcept +constexpr ::std::tuple_element_t> & get(seqan::stl::pair & t) noexcept requires (i < 2) { return ::std::get(static_cast<::std::pair &>(t)); } template <::std::size_t i, class T1, class T2> -constexpr ::std::tuple_element_t> const & get(seqan::std::pair const & t) noexcept +constexpr ::std::tuple_element_t> const & get(seqan::stl::pair const & t) noexcept requires (i < 2) { return ::std::get(static_cast<::std::pair const &>(t)); } template <::std::size_t i, class T1, class T2> -constexpr ::std::tuple_element_t> && get(seqan::std::pair && t) noexcept +constexpr ::std::tuple_element_t> && get(seqan::stl::pair && t) noexcept requires (i < 2) { return ::std::get(static_cast<::std::pair &&>(::std::move(t))); } template <::std::size_t i, class T1, class T2> -constexpr ::std::tuple_element_t> const && get(seqan::std::pair const && t) noexcept +constexpr ::std::tuple_element_t> const && get(seqan::stl::pair const && t) noexcept requires (i < 2) { return ::std::get(static_cast<::std::pair const &&>(::std::move(t))); } template -constexpr type & get(seqan::std::pair & t) noexcept +constexpr type & get(seqan::stl::pair & t) noexcept requires (!::std::same_as) { return ::std::get(static_cast<::std::pair &>(t)); } template -constexpr type const & get(seqan::std::pair const & t) noexcept +constexpr type const & get(seqan::stl::pair const & t) noexcept requires (!::std::same_as) { return ::std::get(static_cast<::std::pair const &>(t)); } template -constexpr type && get(seqan::std::pair && t) noexcept +constexpr type && get(seqan::stl::pair && t) noexcept requires (!::std::same_as) { return ::std::get(static_cast<::std::pair &&>(::std::move(t))); } template -constexpr type const && get(seqan::std::pair const && t) noexcept +constexpr type const && get(seqan::stl::pair const && t) noexcept requires (!::std::same_as) { return ::std::get(static_cast<::std::pair const &&>(::std::move(t))); diff --git a/include/hibf/contrib/std/to.hpp b/include/hibf/contrib/std/to.hpp index d144a820..278c6146 100644 --- a/include/hibf/contrib/std/to.hpp +++ b/include/hibf/contrib/std/to.hpp @@ -7,7 +7,7 @@ /*!\file * \author Enrico Seiler - * \brief Provides seqan::std::ranges::to. + * \brief Provides seqan::stl::ranges::to. */ // File might be included from multiple libraries. @@ -18,21 +18,21 @@ #ifdef __cpp_lib_ranges_to_container -namespace seqan::std +namespace seqan::stl { using ::std::from_range_t; inline constexpr from_range_t from_range{}; -} // namespace seqan::std +} // namespace seqan::stl -namespace seqan::std::ranges +namespace seqan::stl::ranges { using ::std::ranges::to; -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges #else @@ -40,7 +40,7 @@ using ::std::ranges::to; # include "detail/adaptor_from_functor.hpp" -namespace seqan::std +namespace seqan::stl { struct from_range_t @@ -50,9 +50,9 @@ struct from_range_t inline constexpr from_range_t from_range{}; -} // namespace seqan::std +} // namespace seqan::stl -namespace seqan::std::detail::to +namespace seqan::stl::detail::to { // clang-format off @@ -107,9 +107,9 @@ template concept has_input_iterator_category = ::std::derived_from::iterator_category, ::std::input_iterator_tag>; -} // namespace seqan::std::detail::to +} // namespace seqan::stl::detail::to -namespace seqan::std::ranges +namespace seqan::stl::ranges { template @@ -121,22 +121,22 @@ constexpr C to(R && r, Args &&... args) { if constexpr (::std::constructible_from) return C(::std::forward(r), ::std::forward(args)...); - else if constexpr (::std::constructible_from) - return C(seqan::std::from_range, ::std::forward(r), ::std::forward(args)...); + else if constexpr (::std::constructible_from) + return C(seqan::stl::from_range, ::std::forward(r), ::std::forward(args)...); else if constexpr (::std::ranges::common_range - && seqan::std::detail::to::has_input_iterator_category<::std::ranges::iterator_t> + && seqan::stl::detail::to::has_input_iterator_category<::std::ranges::iterator_t> && ::std::constructible_from, ::std::ranges::sentinel_t, Args...>) return C(::std::ranges::begin(r), ::std::ranges::end(r), ::std::forward(args)...); else if constexpr (::std::constructible_from - && seqan::std::detail::to::container_insertable>) + && seqan::stl::detail::to::container_insertable>) { C c(::std::forward(args)...); - if constexpr (::std::ranges::sized_range && seqan::std::detail::to::reservable_container) + if constexpr (::std::ranges::sized_range && seqan::stl::detail::to::reservable_container) c.reserve(static_cast<::std::ranges::range_size_t>(::std::ranges::size(r))); - ::std::ranges::copy(r, seqan::std::detail::to::container_inserter<::std::ranges::range_reference_t>(c)); + ::std::ranges::copy(r, seqan::stl::detail::to::container_inserter<::std::ranges::range_reference_t>(c)); return c; } } @@ -158,25 +158,25 @@ constexpr auto to(R && r, Args &&... args) if constexpr (requires { C(::std::declval(), ::std::declval()...); }) return to(), ::std::declval()...))>(::std::forward(r), ::std::forward(args)...); - else if constexpr (requires { C(seqan::std::from_range, ::std::declval(), ::std::declval()...); }) - return to(), ::std::declval()...))>( + else if constexpr (requires { C(seqan::stl::from_range, ::std::declval(), ::std::declval()...); }) + return to(), ::std::declval()...))>( ::std::forward(r), ::std::forward(args)...); else if constexpr (requires { - C(::std::declval>(), - ::std::declval>(), + C(::std::declval>(), + ::std::declval>(), ::std::declval()...); }) - return to>(), - ::std::declval>(), + return to>(), + ::std::declval>(), ::std::declval()...))>(::std::forward(r), ::std::forward(args)...); else __builtin_unreachable(); } -} // namespace seqan::std::ranges +} // namespace seqan::stl::ranges -namespace seqan::std::detail::to +namespace seqan::stl::detail::to { template @@ -186,13 +186,13 @@ struct to_fn1 template constexpr auto operator()(Args &&... args) const { - return seqan::std::detail::adaptor_from_functor{*this, ::std::forward(args)...}; + return seqan::stl::detail::adaptor_from_functor{*this, ::std::forward(args)...}; } template <::std::ranges::input_range R, class... Args> constexpr auto operator()(R && r, Args &&... args) const { - return seqan::std::ranges::to(::std::forward(r), ::std::forward(args)...); + return seqan::stl::ranges::to(::std::forward(r), ::std::forward(args)...); } }; @@ -202,35 +202,35 @@ struct to_fn2 template constexpr auto operator()(Args &&... args) const { - return seqan::std::detail::adaptor_from_functor{*this, ::std::forward(args)...}; + return seqan::stl::detail::adaptor_from_functor{*this, ::std::forward(args)...}; } template <::std::ranges::input_range R, class... Args> constexpr auto operator()(R && r, Args &&... args) const { - return seqan::std::ranges::to(::std::forward(r), ::std::forward(args)...); + return seqan::stl::ranges::to(::std::forward(r), ::std::forward(args)...); } }; -} // namespace seqan::std::detail::to +} // namespace seqan::stl::detail::to -namespace seqan::std::ranges +namespace seqan::stl::ranges { template requires (!::std::ranges::view) constexpr auto to(Args &&... args) { - return seqan::std::detail::to::to_fn1{}(::std::forward(args)...); + return seqan::stl::detail::to::to_fn1{}(::std::forward(args)...); } template