diff --git a/sprout/checksum/md5.hpp b/sprout/checksum/md5.hpp index efa178ce..04318459 100644 --- a/sprout/checksum/md5.hpp +++ b/sprout/checksum/md5.hpp @@ -372,7 +372,7 @@ namespace sprout { static_cast(bit_count_ % 32) ); } - SPROUT_CONSTEXPR md5 const process_bits(std::uint8_t bits, std::size_t bit_count) { + SPROUT_CONSTEXPR md5 const process_bits(std::uint8_t bits, std::size_t bit_count) const { return process_bits_impl(bits, bit_count); } SPROUT_CONSTEXPR md5 const process_byte(std::uint8_t byte) const { diff --git a/sprout/compost/effects/auto_pan.hpp b/sprout/compost/effects/auto_pan.hpp index 365a247d..4a5e1b0b 100644 --- a/sprout/compost/effects/auto_pan.hpp +++ b/sprout/compost/effects/auto_pan.hpp @@ -97,12 +97,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder - operator()(T const& depth, T const& rate, IntType samples_per_sec) { + operator()(T const& depth, T const& rate, IntType samples_per_sec) const { return sprout::compost::effects::auto_pan_holder(depth, rate, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder - operator()(T const& depth, T const& rate) { + operator()(T const& depth, T const& rate) const { return sprout::compost::effects::auto_pan_holder(depth, rate); } }; diff --git a/sprout/compost/effects/changed_volume.hpp b/sprout/compost/effects/changed_volume.hpp index ae9a9603..6a48e45e 100644 --- a/sprout/compost/effects/changed_volume.hpp +++ b/sprout/compost/effects/changed_volume.hpp @@ -37,7 +37,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::change_volume_holder - operator()(T const& value) { + operator()(T const& value) const { return sprout::compost::effects::change_volume_holder(value); } }; diff --git a/sprout/compost/effects/chorus.hpp b/sprout/compost/effects/chorus.hpp index e0acd5f5..0746ce28 100644 --- a/sprout/compost/effects/chorus.hpp +++ b/sprout/compost/effects/chorus.hpp @@ -105,12 +105,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder - operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) { + operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) const { return sprout::compost::effects::chorus_holder(d, depth, rate, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder - operator()(T const& d, T const& depth, T const& rate) { + operator()(T const& d, T const& depth, T const& rate) const { return sprout::compost::effects::chorus_holder(d, depth, rate); } }; diff --git a/sprout/compost/effects/clipped.hpp b/sprout/compost/effects/clipped.hpp index 41c94ab3..eb701202 100644 --- a/sprout/compost/effects/clipped.hpp +++ b/sprout/compost/effects/clipped.hpp @@ -39,7 +39,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::clip_holder - operator()(T const& low = -1, T const& up = 1) { + operator()(T const& low = -1, T const& up = 1) const { return sprout::compost::effects::clip_holder(low, up); } }; diff --git a/sprout/compost/effects/compressed.hpp b/sprout/compost/effects/compressed.hpp index 5ec6b3d6..30ba3d52 100644 --- a/sprout/compost/effects/compressed.hpp +++ b/sprout/compost/effects/compressed.hpp @@ -92,7 +92,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::compress_holder - operator()(T const& threshold, T const& ratio) { + operator()(T const& threshold, T const& ratio) const { return sprout::compost::effects::compress_holder(threshold, ratio); } }; diff --git a/sprout/compost/effects/distorted.hpp b/sprout/compost/effects/distorted.hpp index a15748dd..e8771c94 100644 --- a/sprout/compost/effects/distorted.hpp +++ b/sprout/compost/effects/distorted.hpp @@ -40,7 +40,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::distort_holder - operator()(T const& gain, T const& level) { + operator()(T const& gain, T const& level) const { return sprout::compost::effects::distort_holder(gain, level); } }; diff --git a/sprout/compost/effects/fuzzed.hpp b/sprout/compost/effects/fuzzed.hpp index ac85c9cc..c2308271 100644 --- a/sprout/compost/effects/fuzzed.hpp +++ b/sprout/compost/effects/fuzzed.hpp @@ -41,7 +41,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::fuzz_holder - operator()(T const& gain, T const& level) { + operator()(T const& gain, T const& level) const { return sprout::compost::effects::fuzz_holder(gain, level); } }; diff --git a/sprout/compost/effects/noise_gated.hpp b/sprout/compost/effects/noise_gated.hpp index 232c398b..09cfbdb6 100644 --- a/sprout/compost/effects/noise_gated.hpp +++ b/sprout/compost/effects/noise_gated.hpp @@ -82,7 +82,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::noise_gate_holder - operator()(T const& threshold) { + operator()(T const& threshold) const { return sprout::compost::effects::noise_gate_holder(threshold); } }; diff --git a/sprout/compost/effects/overdriven.hpp b/sprout/compost/effects/overdriven.hpp index 2145f83c..b9e00659 100644 --- a/sprout/compost/effects/overdriven.hpp +++ b/sprout/compost/effects/overdriven.hpp @@ -68,7 +68,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::overdrive_holder - operator()(T const& gain, T const& level) { + operator()(T const& gain, T const& level) const { return sprout::compost::effects::overdrive_holder(gain, level); } }; diff --git a/sprout/compost/effects/pseudo_stereo.hpp b/sprout/compost/effects/pseudo_stereo.hpp index eddac748..6d7a4d92 100644 --- a/sprout/compost/effects/pseudo_stereo.hpp +++ b/sprout/compost/effects/pseudo_stereo.hpp @@ -93,12 +93,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder - operator()(T const& delay, IntType samples_per_sec) { + operator()(T const& delay, IntType samples_per_sec) const { return sprout::compost::effects::pseudo_stereo_holder(delay, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder - operator()(T const& delay) { + operator()(T const& delay) const { return sprout::compost::effects::pseudo_stereo_holder(delay); } }; diff --git a/sprout/compost/effects/reverbed.hpp b/sprout/compost/effects/reverbed.hpp index 4624839e..53130c81 100644 --- a/sprout/compost/effects/reverbed.hpp +++ b/sprout/compost/effects/reverbed.hpp @@ -100,12 +100,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder - operator()(T const& attenuation, T const& delay, std::size_t repeat, IntType samples_per_sec) { + operator()(T const& attenuation, T const& delay, std::size_t repeat, IntType samples_per_sec) const { return sprout::compost::effects::reverb_holder(attenuation, delay, repeat, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder - operator()(T const& attenuation, T const& delay, std::size_t repeat = 2) { + operator()(T const& attenuation, T const& delay, std::size_t repeat = 2) const { return sprout::compost::effects::reverb_holder(attenuation, delay, repeat); } }; diff --git a/sprout/compost/effects/superposed.hpp b/sprout/compost/effects/superposed.hpp index 26767381..810ea261 100644 --- a/sprout/compost/effects/superposed.hpp +++ b/sprout/compost/effects/superposed.hpp @@ -41,7 +41,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::compost::effects::superpose_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::compost::effects::superpose_holder< typename std::remove_reference::type>::type >( diff --git a/sprout/compost/effects/tremolo.hpp b/sprout/compost/effects/tremolo.hpp index 3f37a04c..e97944c5 100644 --- a/sprout/compost/effects/tremolo.hpp +++ b/sprout/compost/effects/tremolo.hpp @@ -72,12 +72,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder - operator()(T const& depth, T const& rate, IntType samples_per_sec) { + operator()(T const& depth, T const& rate, IntType samples_per_sec) const { return sprout::compost::effects::tremolo_holder(depth, rate, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder - operator()(T const& depth, T const& rate) { + operator()(T const& depth, T const& rate) const { return sprout::compost::effects::tremolo_holder(depth, rate); } }; diff --git a/sprout/compost/effects/vibrato.hpp b/sprout/compost/effects/vibrato.hpp index 4f171b44..34f53d2b 100644 --- a/sprout/compost/effects/vibrato.hpp +++ b/sprout/compost/effects/vibrato.hpp @@ -104,12 +104,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder - operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) { + operator()(T const& d, T const& depth, T const& rate, IntType samples_per_sec) const { return sprout::compost::effects::vibrato_holder(d, depth, rate, samples_per_sec); } template SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder - operator()(T const& d, T const& depth, T const& rate) { + operator()(T const& d, T const& depth, T const& rate) const { return sprout::compost::effects::vibrato_holder(d, depth, rate); } }; diff --git a/sprout/compost/formats/effected_each.hpp b/sprout/compost/formats/effected_each.hpp index 4c5e5513..e4ae3302 100644 --- a/sprout/compost/formats/effected_each.hpp +++ b/sprout/compost/formats/effected_each.hpp @@ -54,12 +54,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder - operator()(LAdaptor const& left_adaptor, RAdaptor const& right_adaptor) { + operator()(LAdaptor const& left_adaptor, RAdaptor const& right_adaptor) const { return sprout::compost::formats::effect_each_holder(left_adaptor, right_adaptor); } template SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder - operator()(Adaptor const& adaptor) { + operator()(Adaptor const& adaptor) const { return sprout::compost::formats::effect_each_holder(adaptor); } }; diff --git a/sprout/compost/formats/effected_left.hpp b/sprout/compost/formats/effected_left.hpp index db36c7cd..556313fc 100644 --- a/sprout/compost/formats/effected_left.hpp +++ b/sprout/compost/formats/effected_left.hpp @@ -35,7 +35,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::formats::effect_left_holder - operator()(Adaptor const& adaptor) { + operator()(Adaptor const& adaptor) const { return sprout::compost::formats::effect_left_holder(adaptor); } }; diff --git a/sprout/compost/formats/effected_right.hpp b/sprout/compost/formats/effected_right.hpp index 093da954..10a73371 100644 --- a/sprout/compost/formats/effected_right.hpp +++ b/sprout/compost/formats/effected_right.hpp @@ -35,7 +35,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::compost::formats::effect_right_holder - operator()(Adaptor const& adaptor) { + operator()(Adaptor const& adaptor) const { return sprout::compost::formats::effect_right_holder(adaptor); } }; diff --git a/sprout/range/adaptor/adapted_dropped.hpp b/sprout/range/adaptor/adapted_dropped.hpp index b47f3735..d411b23c 100644 --- a/sprout/range/adaptor/adapted_dropped.hpp +++ b/sprout/range/adaptor/adapted_dropped.hpp @@ -39,7 +39,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_holder - operator()(Adaptor const& adaptor, Difference distance) { + operator()(Adaptor const& adaptor, Difference distance) const { return sprout::adaptors::adapt_drop_holder(adaptor, distance); } }; diff --git a/sprout/range/adaptor/adapted_dropped_end.hpp b/sprout/range/adaptor/adapted_dropped_end.hpp index e5740868..dcfc6806 100644 --- a/sprout/range/adaptor/adapted_dropped_end.hpp +++ b/sprout/range/adaptor/adapted_dropped_end.hpp @@ -39,7 +39,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_end_holder - operator()(Adaptor const& adaptor, Difference distance) { + operator()(Adaptor const& adaptor, Difference distance) const { return sprout::adaptors::adapt_drop_end_holder(adaptor, distance); } }; diff --git a/sprout/range/adaptor/adapted_offset.hpp b/sprout/range/adaptor/adapted_offset.hpp index fc9202e0..747e9dc6 100644 --- a/sprout/range/adaptor/adapted_offset.hpp +++ b/sprout/range/adaptor/adapted_offset.hpp @@ -64,12 +64,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder - operator()(Adaptor const& adaptor, Difference1 from_begin, Difference2 from_end) { + operator()(Adaptor const& adaptor, Difference1 from_begin, Difference2 from_end) const { return sprout::adaptors::adapt_offset_holder(adaptor, from_begin, from_end); } template SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder - operator()(Adaptor const& adaptor, Difference from_begin) { + operator()(Adaptor const& adaptor, Difference from_begin) const { return sprout::adaptors::adapt_offset_holder(adaptor, from_begin); } }; diff --git a/sprout/range/adaptor/adapted_taken.hpp b/sprout/range/adaptor/adapted_taken.hpp index 4b235de4..3b267838 100644 --- a/sprout/range/adaptor/adapted_taken.hpp +++ b/sprout/range/adaptor/adapted_taken.hpp @@ -39,7 +39,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_take_holder - operator()(Adaptor const& adaptor, Difference distance) { + operator()(Adaptor const& adaptor, Difference distance) const { return sprout::adaptors::adapt_take_holder(adaptor, distance); } }; diff --git a/sprout/range/adaptor/adapted_taken_end.hpp b/sprout/range/adaptor/adapted_taken_end.hpp index 4b171f9d..f3464592 100644 --- a/sprout/range/adaptor/adapted_taken_end.hpp +++ b/sprout/range/adaptor/adapted_taken_end.hpp @@ -39,7 +39,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_take_end_holder - operator()(Adaptor const& adaptor, Difference distance) { + operator()(Adaptor const& adaptor, Difference distance) const { return sprout::adaptors::adapt_take_end_holder(adaptor, distance); } }; diff --git a/sprout/range/adaptor/adapted_window.hpp b/sprout/range/adaptor/adapted_window.hpp index 7878db9e..e0a6558c 100644 --- a/sprout/range/adaptor/adapted_window.hpp +++ b/sprout/range/adaptor/adapted_window.hpp @@ -64,12 +64,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder - operator()(Adaptor const& adaptor, Difference1 to_first, Difference2 to_last) { + operator()(Adaptor const& adaptor, Difference1 to_first, Difference2 to_last) const { return sprout::adaptors::adapt_window_holder(adaptor, to_first, to_last); } template SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder - operator()(Adaptor const& adaptor, Difference to_first) { + operator()(Adaptor const& adaptor, Difference to_first) const { return sprout::adaptors::adapt_window_holder(adaptor, to_first); } }; diff --git a/sprout/range/adaptor/adjacent_filtered.hpp b/sprout/range/adaptor/adjacent_filtered.hpp index d61c92a8..2bc2e83c 100644 --- a/sprout/range/adaptor/adjacent_filtered.hpp +++ b/sprout/range/adaptor/adjacent_filtered.hpp @@ -75,7 +75,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::adjacent_filter_holder - operator()(Predicate pred) { + operator()(Predicate pred) const { return sprout::adaptors::adjacent_filter_holder(pred); } }; diff --git a/sprout/range/adaptor/alternated.hpp b/sprout/range/adaptor/alternated.hpp index 37c8d592..3dcf02ad 100644 --- a/sprout/range/adaptor/alternated.hpp +++ b/sprout/range/adaptor/alternated.hpp @@ -83,7 +83,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::alternate_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::alternate_holder< typename std::remove_reference::type>::type >( diff --git a/sprout/range/adaptor/clamped.hpp b/sprout/range/adaptor/clamped.hpp index 0522378e..2c104c3e 100644 --- a/sprout/range/adaptor/clamped.hpp +++ b/sprout/range/adaptor/clamped.hpp @@ -95,12 +95,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::clamp_holder - operator()(Value const& low, Value const& up, Compare comp) { + operator()(Value const& low, Value const& up, Compare comp) const { return sprout::adaptors::clamp_holder(low, up, comp); } template SPROUT_CONSTEXPR sprout::adaptors::clamp_holder - operator()(Value const& low, Value const& up) { + operator()(Value const& low, Value const& up) const { return sprout::adaptors::clamp_holder(low, up); } }; diff --git a/sprout/range/adaptor/copied.hpp b/sprout/range/adaptor/copied.hpp index b4b78e97..62651894 100644 --- a/sprout/range/adaptor/copied.hpp +++ b/sprout/range/adaptor/copied.hpp @@ -67,7 +67,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename sprout::adaptors::copy_holder - operator()(Result const& result) { + operator()(Result const& result) const { return typename sprout::adaptors::copy_holder(result); } }; diff --git a/sprout/range/adaptor/dropped.hpp b/sprout/range/adaptor/dropped.hpp index 2a8e73c9..cbeab499 100644 --- a/sprout/range/adaptor/dropped.hpp +++ b/sprout/range/adaptor/dropped.hpp @@ -38,7 +38,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::drop_holder - operator()(Difference distance) { + operator()(Difference distance) const { return sprout::adaptors::drop_holder(distance); } }; diff --git a/sprout/range/adaptor/dropped_end.hpp b/sprout/range/adaptor/dropped_end.hpp index 43b88f10..d2c98742 100644 --- a/sprout/range/adaptor/dropped_end.hpp +++ b/sprout/range/adaptor/dropped_end.hpp @@ -38,7 +38,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::drop_end_holder - operator()(Difference distance) { + operator()(Difference distance) const { return sprout::adaptors::drop_end_holder(distance); } }; diff --git a/sprout/range/adaptor/filtered.hpp b/sprout/range/adaptor/filtered.hpp index 59102ca5..c2e37726 100644 --- a/sprout/range/adaptor/filtered.hpp +++ b/sprout/range/adaptor/filtered.hpp @@ -75,7 +75,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::filter_holder - operator()(Predicate pred) { + operator()(Predicate pred) const { return sprout::adaptors::filter_holder(pred); } }; diff --git a/sprout/range/adaptor/indexed.hpp b/sprout/range/adaptor/indexed.hpp index 9e954885..a418bd9c 100644 --- a/sprout/range/adaptor/indexed.hpp +++ b/sprout/range/adaptor/indexed.hpp @@ -75,7 +75,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::indexed_holder - operator()(Index index) { + operator()(Index index) const { return sprout::adaptors::indexed_holder(index); } }; diff --git a/sprout/range/adaptor/jointed.hpp b/sprout/range/adaptor/jointed.hpp index f5161fd4..e19a9655 100644 --- a/sprout/range/adaptor/jointed.hpp +++ b/sprout/range/adaptor/jointed.hpp @@ -78,7 +78,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::joint_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::joint_holder< typename std::remove_reference::type>::type >( diff --git a/sprout/range/adaptor/merged.hpp b/sprout/range/adaptor/merged.hpp index 5dd93b7c..5fb88d49 100644 --- a/sprout/range/adaptor/merged.hpp +++ b/sprout/range/adaptor/merged.hpp @@ -87,7 +87,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::merge_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::merge_holder< typename std::remove_reference::type>::type >( @@ -99,7 +99,7 @@ namespace sprout { typename std::remove_reference::type>::type, Compare > - operator()(RRange&& range, Compare comp) { + operator()(RRange&& range, Compare comp) const { return sprout::adaptors::merge_holder< typename std::remove_reference::type>::type, Compare diff --git a/sprout/range/adaptor/piped.hpp b/sprout/range/adaptor/piped.hpp index b1ad7d11..1db44c5d 100644 --- a/sprout/range/adaptor/piped.hpp +++ b/sprout/range/adaptor/piped.hpp @@ -103,7 +103,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::pipe_holder - operator()(Adaptors const&... adaptors) { + operator()(Adaptors const&... adaptors) const { return sprout::adaptors::pipe_holder(adaptors...); } }; diff --git a/sprout/range/adaptor/removed.hpp b/sprout/range/adaptor/removed.hpp index c29ac171..eeb32f17 100644 --- a/sprout/range/adaptor/removed.hpp +++ b/sprout/range/adaptor/removed.hpp @@ -74,7 +74,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::remove_holder - operator()(T const& value) { + operator()(T const& value) const { return sprout::adaptors::remove_holder(value); } }; diff --git a/sprout/range/adaptor/removed_if.hpp b/sprout/range/adaptor/removed_if.hpp index 9826837b..ba23db57 100644 --- a/sprout/range/adaptor/removed_if.hpp +++ b/sprout/range/adaptor/removed_if.hpp @@ -74,7 +74,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::remove_if_holder - operator()(Predicate pred) { + operator()(Predicate pred) const { return sprout::adaptors::remove_if_holder(pred); } }; diff --git a/sprout/range/adaptor/replaced.hpp b/sprout/range/adaptor/replaced.hpp index 7e288ee3..41705076 100644 --- a/sprout/range/adaptor/replaced.hpp +++ b/sprout/range/adaptor/replaced.hpp @@ -79,7 +79,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::replace_holder - operator()(T const& old_value, T const& new_value) { + operator()(T const& old_value, T const& new_value) const { return sprout::adaptors::replace_holder(old_value, new_value); } }; diff --git a/sprout/range/adaptor/replaced_if.hpp b/sprout/range/adaptor/replaced_if.hpp index 73282de2..210cb08c 100644 --- a/sprout/range/adaptor/replaced_if.hpp +++ b/sprout/range/adaptor/replaced_if.hpp @@ -81,7 +81,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::replace_if_holder - operator()(Predicate pred, T const& new_value) { + operator()(Predicate pred, T const& new_value) const { return sprout::adaptors::replace_if_holder(pred, new_value); } }; diff --git a/sprout/range/adaptor/sawtooth_wave.hpp b/sprout/range/adaptor/sawtooth_wave.hpp index e5a05edc..b6205c4b 100644 --- a/sprout/range/adaptor/sawtooth_wave.hpp +++ b/sprout/range/adaptor/sawtooth_wave.hpp @@ -106,7 +106,7 @@ namespace sprout { Value const& frequency = 1, Value const& amplitude = 1, Value const& phase = 0 - ) + ) const { return sprout::adaptors::sawtooth_wave_range(frequency, amplitude, phase); } diff --git a/sprout/range/adaptor/set_difference.hpp b/sprout/range/adaptor/set_difference.hpp index 78f45dc9..eb22029d 100644 --- a/sprout/range/adaptor/set_difference.hpp +++ b/sprout/range/adaptor/set_difference.hpp @@ -87,7 +87,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::set_difference_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::set_difference_holder< typename std::remove_reference::type>::type >( @@ -99,7 +99,7 @@ namespace sprout { typename std::remove_reference::type>::type, Compare > - operator()(RRange&& range, Compare comp) { + operator()(RRange&& range, Compare comp) const { return sprout::adaptors::set_difference_holder< typename std::remove_reference::type>::type, Compare diff --git a/sprout/range/adaptor/set_intersection.hpp b/sprout/range/adaptor/set_intersection.hpp index 6ccf9c1c..adda50c1 100644 --- a/sprout/range/adaptor/set_intersection.hpp +++ b/sprout/range/adaptor/set_intersection.hpp @@ -87,7 +87,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::set_intersection_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::set_intersection_holder< typename std::remove_reference::type>::type >( @@ -99,7 +99,7 @@ namespace sprout { typename std::remove_reference::type>::type, Compare > - operator()(RRange&& range, Compare comp) { + operator()(RRange&& range, Compare comp) const { return sprout::adaptors::set_intersection_holder< typename std::remove_reference::type>::type, Compare diff --git a/sprout/range/adaptor/set_symmetric_difference.hpp b/sprout/range/adaptor/set_symmetric_difference.hpp index 625bed23..92be4ddc 100644 --- a/sprout/range/adaptor/set_symmetric_difference.hpp +++ b/sprout/range/adaptor/set_symmetric_difference.hpp @@ -87,7 +87,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::set_symmetric_difference_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::set_symmetric_difference_holder< typename std::remove_reference::type>::type >( @@ -99,7 +99,7 @@ namespace sprout { typename std::remove_reference::type>::type, Compare > - operator()(RRange&& range, Compare comp) { + operator()(RRange&& range, Compare comp) const { return sprout::adaptors::set_symmetric_difference_holder< typename std::remove_reference::type>::type, Compare diff --git a/sprout/range/adaptor/set_union.hpp b/sprout/range/adaptor/set_union.hpp index 45e5af27..237dee0a 100644 --- a/sprout/range/adaptor/set_union.hpp +++ b/sprout/range/adaptor/set_union.hpp @@ -87,7 +87,7 @@ namespace sprout { SPROUT_CONSTEXPR sprout::adaptors::set_union_holder< typename std::remove_reference::type>::type > - operator()(RRange&& range) { + operator()(RRange&& range) const { return sprout::adaptors::set_union_holder< typename std::remove_reference::type>::type >( @@ -99,7 +99,7 @@ namespace sprout { typename std::remove_reference::type>::type, Compare > - operator()(RRange&& range, Compare comp) { + operator()(RRange&& range, Compare comp) const { return sprout::adaptors::set_union_holder< typename std::remove_reference::type>::type, Compare diff --git a/sprout/range/adaptor/sinusoidal.hpp b/sprout/range/adaptor/sinusoidal.hpp index 43b66bc8..dcd83323 100644 --- a/sprout/range/adaptor/sinusoidal.hpp +++ b/sprout/range/adaptor/sinusoidal.hpp @@ -106,7 +106,7 @@ namespace sprout { Value const& frequency = 1, Value const& amplitude = 1, Value const& phase = 0 - ) + ) const { return sprout::adaptors::sinusoidal_range(frequency, amplitude, phase); } diff --git a/sprout/range/adaptor/size_enumed.hpp b/sprout/range/adaptor/size_enumed.hpp index 29ab1c2d..643b2d3e 100644 --- a/sprout/range/adaptor/size_enumed.hpp +++ b/sprout/range/adaptor/size_enumed.hpp @@ -115,7 +115,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR typename sprout::adaptors::size_enum_holder - operator()(Size size, bool omit_last = false) { + operator()(Size size, bool omit_last = false) const { return typename sprout::adaptors::size_enum_holder(size, omit_last); } }; diff --git a/sprout/range/adaptor/square_wave.hpp b/sprout/range/adaptor/square_wave.hpp index 3c32d2f7..4d77de69 100644 --- a/sprout/range/adaptor/square_wave.hpp +++ b/sprout/range/adaptor/square_wave.hpp @@ -115,7 +115,7 @@ namespace sprout { Value const& amplitude = 1, Value const& phase = 0, Value const& duty = 0.5 - ) + ) const { return sprout::adaptors::square_wave_range(frequency, amplitude, phase, duty); } diff --git a/sprout/range/adaptor/steps.hpp b/sprout/range/adaptor/steps.hpp index 0cbf57fb..c8516f71 100644 --- a/sprout/range/adaptor/steps.hpp +++ b/sprout/range/adaptor/steps.hpp @@ -86,12 +86,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::step_holder - operator()(Difference width) { + operator()(Difference width) const { return sprout::adaptors::step_holder(width); } template SPROUT_CONSTEXPR sprout::adaptors::step_holder - operator()(Difference width, typename std::common_type::type init) { + operator()(Difference width, typename std::common_type::type init) const { return sprout::adaptors::step_holder(width, init); } }; diff --git a/sprout/range/adaptor/taken.hpp b/sprout/range/adaptor/taken.hpp index 019b688d..df0e8c04 100644 --- a/sprout/range/adaptor/taken.hpp +++ b/sprout/range/adaptor/taken.hpp @@ -38,7 +38,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::take_holder - operator()(Difference distance) { + operator()(Difference distance) const { return sprout::adaptors::take_holder(distance); } }; diff --git a/sprout/range/adaptor/taken_end.hpp b/sprout/range/adaptor/taken_end.hpp index f8c84048..cec229cb 100644 --- a/sprout/range/adaptor/taken_end.hpp +++ b/sprout/range/adaptor/taken_end.hpp @@ -38,7 +38,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::take_end_holder - operator()(Difference distance) { + operator()(Difference distance) const { return sprout::adaptors::take_end_holder(distance); } }; diff --git a/sprout/range/adaptor/transformed.hpp b/sprout/range/adaptor/transformed.hpp index 5ba44e90..d3f1af8e 100644 --- a/sprout/range/adaptor/transformed.hpp +++ b/sprout/range/adaptor/transformed.hpp @@ -136,7 +136,7 @@ namespace sprout { BinaryFunction, typename std::remove_reference::type>::type > - operator()(RRange&& range, BinaryFunction func) { + operator()(RRange&& range, BinaryFunction func) const { return sprout::adaptors::transform_holder< BinaryFunction, typename std::remove_reference::type>::type @@ -147,7 +147,7 @@ namespace sprout { } template SPROUT_CONSTEXPR sprout::adaptors::transform_holder - operator()(UnaryFunction func) { + operator()(UnaryFunction func) const { return sprout::adaptors::transform_holder(func); } }; diff --git a/sprout/range/adaptor/triangle_wave.hpp b/sprout/range/adaptor/triangle_wave.hpp index 3050fa80..c1516a64 100644 --- a/sprout/range/adaptor/triangle_wave.hpp +++ b/sprout/range/adaptor/triangle_wave.hpp @@ -106,7 +106,7 @@ namespace sprout { Value const& frequency = 1, Value const& amplitude = 1, Value const& phase = 0 - ) + ) const { return sprout::adaptors::triangle_wave_range(frequency, amplitude, phase); } diff --git a/sprout/range/adaptor/uniqued.hpp b/sprout/range/adaptor/uniqued.hpp index dc8023ca..4ae894cd 100644 --- a/sprout/range/adaptor/uniqued.hpp +++ b/sprout/range/adaptor/uniqued.hpp @@ -78,7 +78,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::unique_holder - operator()(Predicate pred) { + operator()(Predicate pred) const { return sprout::adaptors::unique_holder(pred); } }; diff --git a/sprout/range/adaptor/valued.hpp b/sprout/range/adaptor/valued.hpp index 0a0e7c88..6165fdb7 100644 --- a/sprout/range/adaptor/valued.hpp +++ b/sprout/range/adaptor/valued.hpp @@ -72,7 +72,7 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::valued_holder - operator()(T const& param) { + operator()(T const& param) const { return sprout::adaptors::valued_holder(param); } }; diff --git a/sprout/range/adaptor/window.hpp b/sprout/range/adaptor/window.hpp index 9ee517d5..3a5568dd 100644 --- a/sprout/range/adaptor/window.hpp +++ b/sprout/range/adaptor/window.hpp @@ -57,12 +57,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::window_holder - operator()(Difference1 to_first, Difference2 to_last) { + operator()(Difference1 to_first, Difference2 to_last) const { return sprout::adaptors::window_holder(to_first, to_last); } template SPROUT_CONSTEXPR sprout::adaptors::window_holder - operator()(Difference to_first) { + operator()(Difference to_first) const { return sprout::adaptors::window_holder(to_first); } }; diff --git a/sprout/string/npos.hpp b/sprout/string/npos.hpp index 61968484..13b70554 100644 --- a/sprout/string/npos.hpp +++ b/sprout/string/npos.hpp @@ -1,6 +1,7 @@ #ifndef SPROUT_STRING_NPOS_HPP #define SPROUT_STRING_NPOS_HPP +#include #include #include #include @@ -11,6 +12,11 @@ namespace sprout { // npos // struct npos_t { + public: + template::value>::type = sprout::enabler> + struct get + : public std::integral_constant + {}; public: template::value>::type = sprout::enabler> SPROUT_CONSTEXPR operator UIntType() const { @@ -18,7 +24,7 @@ namespace sprout { } }; namespace { - SPROUT_STATIC_CONSTEXPR sprout::npos_t npos{}; + SPROUT_STATIC_CONSTEXPR sprout::npos_t npos = {}; } // anonymous-namespace // diff --git a/sprout/string/string.hpp b/sprout/string/string.hpp index e0f75657..364294d7 100644 --- a/sprout/string/string.hpp +++ b/sprout/string/string.hpp @@ -76,7 +76,7 @@ namespace sprout { {}; #endif public: - SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos; + SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos_t::get::value; SPROUT_STATIC_CONSTEXPR size_type static_size = N; private: template diff --git a/sprout/utility/string_ref/string_ref.hpp b/sprout/utility/string_ref/string_ref.hpp index e5b204dc..32e1260f 100644 --- a/sprout/utility/string_ref/string_ref.hpp +++ b/sprout/utility/string_ref/string_ref.hpp @@ -66,7 +66,7 @@ namespace sprout { {}; #endif public: - SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos; + SPROUT_STATIC_CONSTEXPR size_type npos = sprout::npos_t::get::value; private: const_pointer ptr_; size_type len_; @@ -211,7 +211,7 @@ namespace sprout { len_ -= n; } SPROUT_CONSTEXPR basic_string_ref - remove_prefix(size_type n) { + remove_prefix(size_type n) const { return n > size() ? basic_string_ref(data() + size(), 0) : basic_string_ref(data() + n, size() - n) ; @@ -224,7 +224,7 @@ namespace sprout { len_ -= n; } SPROUT_CONSTEXPR basic_string_ref - remove_suffix(size_type n) { + remove_suffix(size_type n) const { return n > size() ? basic_string_ref(data(), 0) : basic_string_ref(data(), size() - n) ;