From 2897bad30ac92d04e6c4840a578043b061ffce8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 17 Mar 2026 11:46:42 +0100 Subject: [PATCH] Add forceinline to trivial functions. --- .../container/experimental/segmented_equal.hpp | 4 ++-- .../container/experimental/segmented_fill.hpp | 2 +- .../container/experimental/segmented_find.hpp | 2 +- .../experimental/segmented_find_if.hpp | 2 +- .../experimental/segmented_find_if_not.hpp | 2 +- .../experimental/segmented_for_each.hpp | 2 +- .../experimental/segmented_generate.hpp | 2 +- .../experimental/segmented_is_partitioned.hpp | 4 ++-- .../experimental/segmented_is_sorted.hpp | 4 ++-- .../experimental/segmented_is_sorted_until.hpp | 4 ++-- .../container/experimental/segmented_merge.hpp | 4 ++-- .../experimental/segmented_partition.hpp | 2 +- .../experimental/segmented_partition_copy.hpp | 2 +- .../experimental/segmented_partition_point.hpp | 2 +- .../container/experimental/segmented_remove.hpp | 2 +- .../experimental/segmented_remove_copy.hpp | 2 +- .../experimental/segmented_remove_copy_if.hpp | 2 +- .../experimental/segmented_remove_if.hpp | 2 +- .../experimental/segmented_replace.hpp | 2 +- .../experimental/segmented_replace_if.hpp | 2 +- .../experimental/segmented_reverse.hpp | 2 +- .../experimental/segmented_reverse_copy.hpp | 2 +- .../container/experimental/segmented_search.hpp | 2 +- .../experimental/segmented_search_n.hpp | 2 +- .../experimental/segmented_set_intersection.hpp | 8 ++++---- .../experimental/segmented_stable_partition.hpp | 17 +++++++---------- .../experimental/segmented_swap_ranges.hpp | 2 +- .../experimental/segmented_transform.hpp | 2 +- 28 files changed, 42 insertions(+), 45 deletions(-) diff --git a/include/boost/container/experimental/segmented_equal.hpp b/include/boost/container/experimental/segmented_equal.hpp index 72dd0c2..23dc706 100644 --- a/include/boost/container/experimental/segmented_equal.hpp +++ b/include/boost/container/experimental/segmented_equal.hpp @@ -65,7 +65,7 @@ bool segmented_equal_ref } template -typename algo_enable_if_c< +BOOST_CONTAINER_FORCEINLINE typename algo_enable_if_c< !Tag::value || is_sentinel::value, bool>::type segmented_equal_ref (InpIter1 first1, Sent last1, InpIter2& first2, Tag) @@ -78,7 +78,7 @@ segmented_equal_ref //! Returns \c true if elements in [first1, last1) are equal to the //! range starting at \c first2. Exploits segmentation on the first range. template -inline bool segmented_equal(InpIter1 first1, Sent last1, InpIter2 first2) +BOOST_CONTAINER_FORCEINLINE bool segmented_equal(InpIter1 first1, Sent last1, InpIter2 first2) { typedef segmented_iterator_traits traits; return detail_algo::segmented_equal_ref(first1, last1, first2, diff --git a/include/boost/container/experimental/segmented_fill.hpp b/include/boost/container/experimental/segmented_fill.hpp index 2354c88..1891eb6 100644 --- a/include/boost/container/experimental/segmented_fill.hpp +++ b/include/boost/container/experimental/segmented_fill.hpp @@ -30,7 +30,7 @@ namespace container { //! When \c Iter is a segmented iterator, exploits segmentation //! to reduce per-element overhead. template -inline void segmented_fill(FwdIt first, Sent last, const T& value) +BOOST_CONTAINER_FORCEINLINE void segmented_fill(FwdIt first, Sent last, const T& value) { (segmented_generate)(first, last, detail_algo::constref_generator(value)); } diff --git a/include/boost/container/experimental/segmented_find.hpp b/include/boost/container/experimental/segmented_find.hpp index 9620383..7ac2522 100644 --- a/include/boost/container/experimental/segmented_find.hpp +++ b/include/boost/container/experimental/segmented_find.hpp @@ -29,7 +29,7 @@ namespace container { //! Returns an iterator to the first element equal to \c value //! in [first, last), or \c last if not found. template -inline InpIter segmented_find(InpIter first, Sent last, const T& value) +BOOST_CONTAINER_FORCEINLINE InpIter segmented_find(InpIter first, Sent last, const T& value) { return boost::container::segmented_find_if(first, last, equal_to_value(value)); } diff --git a/include/boost/container/experimental/segmented_find_if.hpp b/include/boost/container/experimental/segmented_find_if.hpp index 500fe22..a3ca048 100644 --- a/include/boost/container/experimental/segmented_find_if.hpp +++ b/include/boost/container/experimental/segmented_find_if.hpp @@ -89,7 +89,7 @@ segmented_find_if_dispatch //! Returns an iterator to the first element satisfying \c pred //! in [first, last), or \c last if not found. template -inline InpIter segmented_find_if(InpIter first, Sent last, Pred pred) +BOOST_CONTAINER_FORCEINLINE InpIter segmented_find_if(InpIter first, Sent last, Pred pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_find_if_dispatch(first, last, pred, diff --git a/include/boost/container/experimental/segmented_find_if_not.hpp b/include/boost/container/experimental/segmented_find_if_not.hpp index 48cb5b9..18dc0f0 100644 --- a/include/boost/container/experimental/segmented_find_if_not.hpp +++ b/include/boost/container/experimental/segmented_find_if_not.hpp @@ -29,7 +29,7 @@ namespace container { //! Returns an iterator to the first element for which \c pred //! returns false in [first, last), or \c last if not found. template -inline InpIter segmented_find_if_not(InpIter first, Sent last, Pred pred) +BOOST_CONTAINER_FORCEINLINE InpIter segmented_find_if_not(InpIter first, Sent last, Pred pred) { return boost::container::segmented_find_if(first, last, not_pred(pred)); } diff --git a/include/boost/container/experimental/segmented_for_each.hpp b/include/boost/container/experimental/segmented_for_each.hpp index f3d616e..ba1ac14 100644 --- a/include/boost/container/experimental/segmented_for_each.hpp +++ b/include/boost/container/experimental/segmented_for_each.hpp @@ -67,7 +67,7 @@ segmented_for_each_dispatch //! When \c Iter is a segmented iterator, exploits segmentation //! to reduce per-element overhead. template -inline F segmented_for_each(InpIter first, Sent last, F f) +BOOST_CONTAINER_FORCEINLINE F segmented_for_each(InpIter first, Sent last, F f) { typedef segmented_iterator_traits traits; return detail_algo::segmented_for_each_dispatch(first, last, f, diff --git a/include/boost/container/experimental/segmented_generate.hpp b/include/boost/container/experimental/segmented_generate.hpp index 99a91d8..798555e 100644 --- a/include/boost/container/experimental/segmented_generate.hpp +++ b/include/boost/container/experimental/segmented_generate.hpp @@ -71,7 +71,7 @@ segmented_generate_ref(FwdIt first, Sent last, Generator& gen, Tag) //! element in [first, last). //! Generator state is preserved across segment boundaries. template -inline void segmented_generate(FwdIt first, Sent last, Generator gen) +BOOST_CONTAINER_FORCEINLINE void segmented_generate(FwdIt first, Sent last, Generator gen) { typedef segmented_iterator_traits traits; detail_algo::segmented_generate_ref(first, last, gen, diff --git a/include/boost/container/experimental/segmented_is_partitioned.hpp b/include/boost/container/experimental/segmented_is_partitioned.hpp index 2ae9abe..1e9a15e 100644 --- a/include/boost/container/experimental/segmented_is_partitioned.hpp +++ b/include/boost/container/experimental/segmented_is_partitioned.hpp @@ -75,7 +75,7 @@ bool segmented_is_partitioned_dispatch } template -typename algo_enable_if_c< +BOOST_CONTAINER_FORCEINLINE typename algo_enable_if_c< !Tag::value || is_sentinel::value, bool>::type segmented_is_partitioned_dispatch (InpIter first, Sent last, Pred pred, Tag) @@ -91,7 +91,7 @@ segmented_is_partitioned_dispatch //! partitioned with respect to \c pred. //! Exploits segmentation when available. template -inline bool segmented_is_partitioned(InpIter first, Sent last, Pred pred) +BOOST_CONTAINER_FORCEINLINE bool segmented_is_partitioned(InpIter first, Sent last, Pred pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_is_partitioned_dispatch(first, last, pred, diff --git a/include/boost/container/experimental/segmented_is_sorted.hpp b/include/boost/container/experimental/segmented_is_sorted.hpp index d88aa09..542abf7 100644 --- a/include/boost/container/experimental/segmented_is_sorted.hpp +++ b/include/boost/container/experimental/segmented_is_sorted.hpp @@ -27,14 +27,14 @@ namespace container { //! Returns true if [first, last) is sorted according to \c comp. template -inline bool segmented_is_sorted(FwdIt first, Sent last, Comp comp) +BOOST_CONTAINER_FORCEINLINE bool segmented_is_sorted(FwdIt first, Sent last, Comp comp) { return boost::container::segmented_is_sorted_until(first, last, comp) == last; } //! Returns true if [first, last) is sorted using operator<. template -inline bool segmented_is_sorted(FwdIt first, Sent last) +BOOST_CONTAINER_FORCEINLINE bool segmented_is_sorted(FwdIt first, Sent last) { return boost::container::segmented_is_sorted_until(first, last) == last; } diff --git a/include/boost/container/experimental/segmented_is_sorted_until.hpp b/include/boost/container/experimental/segmented_is_sorted_until.hpp index 5bfbee1..5a9ff28 100644 --- a/include/boost/container/experimental/segmented_is_sorted_until.hpp +++ b/include/boost/container/experimental/segmented_is_sorted_until.hpp @@ -140,7 +140,7 @@ segmented_is_sorted_until_dispatch //! in [first, last), using \c comp for comparison. //! Returns \c last if the range is sorted. template -inline FwdIt segmented_is_sorted_until(FwdIt first, Sent last, Comp comp) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_is_sorted_until(FwdIt first, Sent last, Comp comp) { typedef segmented_iterator_traits traits; return detail_algo::segmented_is_sorted_until_dispatch(first, last, comp, @@ -151,7 +151,7 @@ inline FwdIt segmented_is_sorted_until(FwdIt first, Sent last, Comp comp) //! in [first, last), using operator<. //! Returns \c last if the range is sorted. template -inline FwdIt segmented_is_sorted_until(FwdIt first, Sent last) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_is_sorted_until(FwdIt first, Sent last) { typedef segmented_iterator_traits traits; return detail_algo::segmented_is_sorted_until_dispatch(first, last, diff --git a/include/boost/container/experimental/segmented_merge.hpp b/include/boost/container/experimental/segmented_merge.hpp index 81c8d0d..7605ddd 100644 --- a/include/boost/container/experimental/segmented_merge.hpp +++ b/include/boost/container/experimental/segmented_merge.hpp @@ -115,7 +115,7 @@ segmented_merge_dispatch } // namespace detail_algo template -inline OutIter segmented_merge +BOOST_CONTAINER_FORCEINLINE OutIter segmented_merge (InIter1 first1, Sent1 last1, InIter2 first2, Sent2 last2, OutIter result, Comp comp) { typedef segmented_iterator_traits traits; @@ -124,7 +124,7 @@ inline OutIter segmented_merge } template -inline OutIter segmented_merge +BOOST_CONTAINER_FORCEINLINE OutIter segmented_merge (InIter1 first1, Sent1 last1, InIter2 first2, Sent2 last2, OutIter result) { return boost::container::segmented_merge(first1, last1, first2, last2, result, diff --git a/include/boost/container/experimental/segmented_partition.hpp b/include/boost/container/experimental/segmented_partition.hpp index 3d6ad04..ad3fcd3 100644 --- a/include/boost/container/experimental/segmented_partition.hpp +++ b/include/boost/container/experimental/segmented_partition.hpp @@ -97,7 +97,7 @@ segmented_partition_dispatch //! \c pred come before those that do not (Lomuto-style partition). //! Returns an iterator to the partition point. template -inline FwdIt segmented_partition(FwdIt first, Sent last, Pred pred) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_partition(FwdIt first, Sent last, Pred pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_partition_dispatch(first, last, pred, diff --git a/include/boost/container/experimental/segmented_partition_copy.hpp b/include/boost/container/experimental/segmented_partition_copy.hpp index 3f0602b..482d3da 100644 --- a/include/boost/container/experimental/segmented_partition_copy.hpp +++ b/include/boost/container/experimental/segmented_partition_copy.hpp @@ -94,7 +94,7 @@ segmented_partition_copy_dispatch //! depending on whether \c pred returns true or false. //! Returns a pair of output iterators past the last elements written. template -inline std::pair +BOOST_CONTAINER_FORCEINLINE std::pair segmented_partition_copy(InIter first, Sent last, OutIter1 out_true, OutIter2 out_false, Pred pred) { typedef segmented_iterator_traits traits; diff --git a/include/boost/container/experimental/segmented_partition_point.hpp b/include/boost/container/experimental/segmented_partition_point.hpp index 9cf5c41..0269c89 100644 --- a/include/boost/container/experimental/segmented_partition_point.hpp +++ b/include/boost/container/experimental/segmented_partition_point.hpp @@ -77,7 +77,7 @@ segmented_partition_point_dispatch //! for which \c pred returns false. The range must be partitioned //! with respect to \c pred. template -inline FwdIt segmented_partition_point(FwdIt first, Sent last, Predicate pred) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_partition_point(FwdIt first, Sent last, Predicate pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_partition_point_dispatch(first, last, pred, diff --git a/include/boost/container/experimental/segmented_remove.hpp b/include/boost/container/experimental/segmented_remove.hpp index 903ecb4..bcb5d2b 100644 --- a/include/boost/container/experimental/segmented_remove.hpp +++ b/include/boost/container/experimental/segmented_remove.hpp @@ -29,7 +29,7 @@ namespace container { //! Removes all elements equal to \c value from [first, last), //! moving retained elements forward. Returns iterator to new end. template -inline FwdIt segmented_remove(FwdIt first, Sent last, const T& value) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_remove(FwdIt first, Sent last, const T& value) { return boost::container::segmented_remove_if(first, last, equal_to_value(value)); } diff --git a/include/boost/container/experimental/segmented_remove_copy.hpp b/include/boost/container/experimental/segmented_remove_copy.hpp index e95131d..84c9c8c 100644 --- a/include/boost/container/experimental/segmented_remove_copy.hpp +++ b/include/boost/container/experimental/segmented_remove_copy.hpp @@ -30,7 +30,7 @@ namespace container { //! skipping elements equal to \c value. Returns the output iterator past //! the last element written. template -inline OutIter segmented_remove_copy(InIter first, Sent last, OutIter result, const T& value) +BOOST_CONTAINER_FORCEINLINE OutIter segmented_remove_copy(InIter first, Sent last, OutIter result, const T& value) { return boost::container::segmented_remove_copy_if(first, last, result, equal_to_value(value)); } diff --git a/include/boost/container/experimental/segmented_remove_copy_if.hpp b/include/boost/container/experimental/segmented_remove_copy_if.hpp index a2ad0a3..0669191 100644 --- a/include/boost/container/experimental/segmented_remove_copy_if.hpp +++ b/include/boost/container/experimental/segmented_remove_copy_if.hpp @@ -70,7 +70,7 @@ segmented_remove_copy_if_dispatch //! skipping elements satisfying \c pred. Returns the output iterator past //! the last element written. template -inline OutIter segmented_remove_copy_if(InIter first, Sent last, OutIter result, Pred pred) +BOOST_CONTAINER_FORCEINLINE OutIter segmented_remove_copy_if(InIter first, Sent last, OutIter result, Pred pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_remove_copy_if_dispatch(first, last, result, pred, diff --git a/include/boost/container/experimental/segmented_remove_if.hpp b/include/boost/container/experimental/segmented_remove_if.hpp index acb069e..624ff62 100644 --- a/include/boost/container/experimental/segmented_remove_if.hpp +++ b/include/boost/container/experimental/segmented_remove_if.hpp @@ -33,7 +33,7 @@ namespace container { //! Removes all elements for which \c pred returns true from [first, last), //! moving retained elements forward. Returns iterator to new end. template -inline FwdIt segmented_remove_if(FwdIt first, Sent last, Predicate pred) +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_remove_if(FwdIt first, Sent last, Predicate pred) { first = segmented_find_if(first, last, pred); if (first == last) diff --git a/include/boost/container/experimental/segmented_replace.hpp b/include/boost/container/experimental/segmented_replace.hpp index fe1ae26..d591604 100644 --- a/include/boost/container/experimental/segmented_replace.hpp +++ b/include/boost/container/experimental/segmented_replace.hpp @@ -28,7 +28,7 @@ namespace container { //! Replaces every occurrence of \c old_val with \c new_val in [first, last). template -inline void segmented_replace +BOOST_CONTAINER_FORCEINLINE void segmented_replace (FwdIt first, Sent last, const T& old_val, const T& new_val) { boost::container::segmented_replace_if(first, last, equal_to_value(old_val), new_val); diff --git a/include/boost/container/experimental/segmented_replace_if.hpp b/include/boost/container/experimental/segmented_replace_if.hpp index a761ca7..38caaaa 100644 --- a/include/boost/container/experimental/segmented_replace_if.hpp +++ b/include/boost/container/experimental/segmented_replace_if.hpp @@ -63,7 +63,7 @@ segmented_replace_if_dispatch //! Replaces every element satisfying \c pred with \c new_val in [first, last). template -inline void segmented_replace_if(FwdIt first, Sent last, Pred pred, const T& new_val) +BOOST_CONTAINER_FORCEINLINE void segmented_replace_if(FwdIt first, Sent last, Pred pred, const T& new_val) { typedef segmented_iterator_traits traits; detail_algo::segmented_replace_if_dispatch(first, last, pred, new_val, diff --git a/include/boost/container/experimental/segmented_reverse.hpp b/include/boost/container/experimental/segmented_reverse.hpp index 6eae066..d203a60 100644 --- a/include/boost/container/experimental/segmented_reverse.hpp +++ b/include/boost/container/experimental/segmented_reverse.hpp @@ -114,7 +114,7 @@ void segmented_reverse_dispatch(SegIt first, SegIt last, segmented_iterator_tag) //! When the iterator is segmented, exploits segmentation on both //! the forward and backward sides to reduce per-element overhead. template -void segmented_reverse(BidirIter first, BidirIter last) +BOOST_CONTAINER_FORCEINLINE void segmented_reverse(BidirIter first, BidirIter last) { typedef segmented_iterator_traits traits; detail_algo::segmented_reverse_dispatch(first, last, diff --git a/include/boost/container/experimental/segmented_reverse_copy.hpp b/include/boost/container/experimental/segmented_reverse_copy.hpp index 8dc903d..6263415 100644 --- a/include/boost/container/experimental/segmented_reverse_copy.hpp +++ b/include/boost/container/experimental/segmented_reverse_copy.hpp @@ -82,7 +82,7 @@ OutIter segmented_reverse_copy_dispatch //! each local range without per-element segment-boundary overhead. //! Returns the output iterator past the last element written. template -inline OutIter segmented_reverse_copy(BidirIter first, BidirIter last, OutIter result) +BOOST_CONTAINER_FORCEINLINE OutIter segmented_reverse_copy(BidirIter first, BidirIter last, OutIter result) { typedef segmented_iterator_traits traits; return detail_algo::segmented_reverse_copy_dispatch(first, last, result, diff --git a/include/boost/container/experimental/segmented_search.hpp b/include/boost/container/experimental/segmented_search.hpp index 2fe1cec..c142066 100644 --- a/include/boost/container/experimental/segmented_search.hpp +++ b/include/boost/container/experimental/segmented_search.hpp @@ -131,7 +131,7 @@ segmented_search_dispatch //! Finds the first occurrence of the subsequence [s_first, s_last) in [first, last). //! Returns an iterator to the beginning of the found subsequence, or \c last if not found. template -inline FwdIt1 segmented_search +BOOST_CONTAINER_FORCEINLINE FwdIt1 segmented_search (FwdIt1 first, Sent1 last, FwdIt2 s_first, Sent2 s_last) { typedef segmented_iterator_traits traits; diff --git a/include/boost/container/experimental/segmented_search_n.hpp b/include/boost/container/experimental/segmented_search_n.hpp index 9030d9e..bd7f3f2 100644 --- a/include/boost/container/experimental/segmented_search_n.hpp +++ b/include/boost/container/experimental/segmented_search_n.hpp @@ -147,7 +147,7 @@ segmented_search_n_dispatch //! Finds the first occurrence of \c count consecutive elements equal to \c value //! in [first, last). Returns an iterator to the start of the run, or \c last if not found. template -inline FwdIt segmented_search_n +BOOST_CONTAINER_FORCEINLINE FwdIt segmented_search_n (FwdIt first, Sent last, Size count, const T& value) { typedef segmented_iterator_traits traits; diff --git a/include/boost/container/experimental/segmented_set_intersection.hpp b/include/boost/container/experimental/segmented_set_intersection.hpp index b1105db..cef71b8 100644 --- a/include/boost/container/experimental/segmented_set_intersection.hpp +++ b/include/boost/container/experimental/segmented_set_intersection.hpp @@ -38,7 +38,7 @@ namespace detail_algo { struct set_intersection_default_less { template - bool operator()(const T& a, const T& b) const { return a < b; } + BOOST_CONTAINER_FORCEINLINE bool operator()(const T& a, const T& b) const { return a < b; } }; template @@ -77,7 +77,7 @@ void set_intersection_scan(SegIt first, SegIt last, InIter2& first2, Sent2 last2 } template -OutIter segmented_set_intersection_dispatch +BOOST_CONTAINER_FORCEINLINE OutIter segmented_set_intersection_dispatch (SegIter first1, SegIter last1, InIter2 first2, Sent2 last2, OutIter result, Comp comp, segmented_iterator_tag) { set_intersection_scan(first1, last1, first2, last2, result, comp, segmented_iterator_tag()); @@ -101,7 +101,7 @@ segmented_set_intersection_dispatch } // namespace detail_algo template -inline OutIter segmented_set_intersection +BOOST_CONTAINER_FORCEINLINE OutIter segmented_set_intersection (InIter1 first1, Sent1 last1, InIter2 first2, Sent2 last2, OutIter result, Comp comp) { typedef segmented_iterator_traits traits; @@ -110,7 +110,7 @@ inline OutIter segmented_set_intersection } template -inline OutIter segmented_set_intersection +BOOST_CONTAINER_FORCEINLINE OutIter segmented_set_intersection (InIter1 first1, Sent1 last1, InIter2 first2, Sent2 last2, OutIter result) { return boost::container::segmented_set_intersection(first1, last1, first2, last2, result, diff --git a/include/boost/container/experimental/segmented_stable_partition.hpp b/include/boost/container/experimental/segmented_stable_partition.hpp index df68f11..9089d6c 100644 --- a/include/boost/container/experimental/segmented_stable_partition.hpp +++ b/include/boost/container/experimental/segmented_stable_partition.hpp @@ -63,10 +63,10 @@ struct sp_chained_composer OuterComposer outer_; typename Traits::segment_iterator seg_; - sp_chained_composer(OuterComposer o, typename Traits::segment_iterator s) + BOOST_CONTAINER_FORCEINLINE sp_chained_composer(OuterComposer o, typename Traits::segment_iterator s) : outer_(o), seg_(s) {} - result_type operator()(typename Traits::local_iterator l) const + BOOST_CONTAINER_FORCEINLINE result_type operator()(typename Traits::local_iterator l) const { return outer_(Traits::compose(seg_, l)); } }; @@ -118,20 +118,17 @@ OuterIter stable_partition_scan(SegIt first, SegIt last, OuterIter result, } template -SegIter segmented_stable_partition_dispatch +BOOST_CONTAINER_FORCEINLINE SegIter segmented_stable_partition_dispatch (SegIter first, SegIter last, Pred pred, segmented_iterator_tag) { - SegIter result = first; - sp_identity_composer composer; - return stable_partition_scan(first, last, result, composer, pred, segmented_iterator_tag()); + return stable_partition_scan(first, last, first, sp_identity_composer(), pred, segmented_iterator_tag()); } template -BidirIt segmented_stable_partition_dispatch +BOOST_CONTAINER_FORCEINLINE BidirIt segmented_stable_partition_dispatch (BidirIt first, BidirIt last, Pred pred, non_segmented_iterator_tag) { - sp_identity_composer composer; - return stable_partition_scan(first, last, first, composer, pred, non_segmented_iterator_tag()); + return stable_partition_scan(first, last, first, sp_identity_composer(), pred, non_segmented_iterator_tag()); } } // namespace detail_algo @@ -140,7 +137,7 @@ BidirIt segmented_stable_partition_dispatch //! \c pred come before those that do not, preserving relative order //! within each group. Returns an iterator to the partition point. template -inline BidirIt segmented_stable_partition(BidirIt first, BidirIt last, Pred pred) +BOOST_CONTAINER_FORCEINLINE BidirIt segmented_stable_partition(BidirIt first, BidirIt last, Pred pred) { typedef segmented_iterator_traits traits; return detail_algo::segmented_stable_partition_dispatch(first, last, pred, diff --git a/include/boost/container/experimental/segmented_swap_ranges.hpp b/include/boost/container/experimental/segmented_swap_ranges.hpp index b8cdc0c..2a3fb04 100644 --- a/include/boost/container/experimental/segmented_swap_ranges.hpp +++ b/include/boost/container/experimental/segmented_swap_ranges.hpp @@ -68,7 +68,7 @@ segmented_swap_ranges_dispatch //! Returns an iterator past the last swapped element in the second range. //! Segmentation is exploited on the first range. template -inline FwdIt2 segmented_swap_ranges(FwdIt1 first1, Sent last1, FwdIt2 first2) +BOOST_CONTAINER_FORCEINLINE FwdIt2 segmented_swap_ranges(FwdIt1 first1, Sent last1, FwdIt2 first2) { typedef segmented_iterator_traits traits; return detail_algo::segmented_swap_ranges_dispatch(first1, last1, first2, diff --git a/include/boost/container/experimental/segmented_transform.hpp b/include/boost/container/experimental/segmented_transform.hpp index 06c8893..9f4fa07 100644 --- a/include/boost/container/experimental/segmented_transform.hpp +++ b/include/boost/container/experimental/segmented_transform.hpp @@ -70,7 +70,7 @@ segmented_transform_dispatch //! to the range beginning at \c result. //! Segmentation is exploited on the input range only. template -inline OutIter segmented_transform +BOOST_CONTAINER_FORCEINLINE OutIter segmented_transform (InIter first, Sent last, OutIter result, UnaryOp op) { typedef segmented_iterator_traits traits;