mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
fix for constexpr disabled
This commit is contained in:
parent
84376c3f69
commit
4c996bd47b
58 changed files with 84 additions and 78 deletions
|
@ -372,7 +372,7 @@ namespace sprout {
|
|||
static_cast<std::size_t>(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 {
|
||||
|
|
|
@ -97,12 +97,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder<T, IntType>
|
||||
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<T, IntType>(depth, rate, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::auto_pan_holder<T>
|
||||
operator()(T const& depth, T const& rate) {
|
||||
operator()(T const& depth, T const& rate) const {
|
||||
return sprout::compost::effects::auto_pan_holder<T>(depth, rate);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::change_volume_holder<T>
|
||||
operator()(T const& value) {
|
||||
operator()(T const& value) const {
|
||||
return sprout::compost::effects::change_volume_holder<T>(value);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -105,12 +105,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder<T, IntType>
|
||||
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<T, IntType>(d, depth, rate, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::chorus_holder<T>
|
||||
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<T>(d, depth, rate);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T = double>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::clip_holder<T>
|
||||
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<T>(low, up);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::compress_holder<T>
|
||||
operator()(T const& threshold, T const& ratio) {
|
||||
operator()(T const& threshold, T const& ratio) const {
|
||||
return sprout::compost::effects::compress_holder<T>(threshold, ratio);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::distort_holder<T>
|
||||
operator()(T const& gain, T const& level) {
|
||||
operator()(T const& gain, T const& level) const {
|
||||
return sprout::compost::effects::distort_holder<T>(gain, level);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::fuzz_holder<T>
|
||||
operator()(T const& gain, T const& level) {
|
||||
operator()(T const& gain, T const& level) const {
|
||||
return sprout::compost::effects::fuzz_holder<T>(gain, level);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::noise_gate_holder<T>
|
||||
operator()(T const& threshold) {
|
||||
operator()(T const& threshold) const {
|
||||
return sprout::compost::effects::noise_gate_holder<T>(threshold);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::overdrive_holder<T>
|
||||
operator()(T const& gain, T const& level) {
|
||||
operator()(T const& gain, T const& level) const {
|
||||
return sprout::compost::effects::overdrive_holder<T>(gain, level);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -93,12 +93,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder<T, IntType>
|
||||
operator()(T const& delay, IntType samples_per_sec) {
|
||||
operator()(T const& delay, IntType samples_per_sec) const {
|
||||
return sprout::compost::effects::pseudo_stereo_holder<T, IntType>(delay, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::pseudo_stereo_holder<T>
|
||||
operator()(T const& delay) {
|
||||
operator()(T const& delay) const {
|
||||
return sprout::compost::effects::pseudo_stereo_holder<T>(delay);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -100,12 +100,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder<T, IntType>
|
||||
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<T, IntType>(attenuation, delay, repeat, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::reverb_holder<T>
|
||||
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<T>(attenuation, delay, repeat);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::compost::effects::superpose_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::compost::effects::superpose_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
|
|
@ -72,12 +72,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder<T, IntType>
|
||||
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<T, IntType>(depth, rate, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::tremolo_holder<T>
|
||||
operator()(T const& depth, T const& rate) {
|
||||
operator()(T const& depth, T const& rate) const {
|
||||
return sprout::compost::effects::tremolo_holder<T>(depth, rate);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -104,12 +104,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T, typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder<T, IntType>
|
||||
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<T, IntType>(d, depth, rate, samples_per_sec);
|
||||
}
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::compost::effects::vibrato_holder<T>
|
||||
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<T>(d, depth, rate);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -54,12 +54,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename LAdaptor, typename RAdaptor>
|
||||
SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder<LAdaptor, RAdaptor>
|
||||
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<LAdaptor, RAdaptor>(left_adaptor, right_adaptor);
|
||||
}
|
||||
template<typename Adaptor>
|
||||
SPROUT_CONSTEXPR sprout::compost::formats::effect_each_holder<Adaptor>
|
||||
operator()(Adaptor const& adaptor) {
|
||||
operator()(Adaptor const& adaptor) const {
|
||||
return sprout::compost::formats::effect_each_holder<Adaptor>(adaptor);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor>
|
||||
SPROUT_CONSTEXPR sprout::compost::formats::effect_left_holder<Adaptor>
|
||||
operator()(Adaptor const& adaptor) {
|
||||
operator()(Adaptor const& adaptor) const {
|
||||
return sprout::compost::formats::effect_left_holder<Adaptor>(adaptor);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor>
|
||||
SPROUT_CONSTEXPR sprout::compost::formats::effect_right_holder<Adaptor>
|
||||
operator()(Adaptor const& adaptor) {
|
||||
operator()(Adaptor const& adaptor) const {
|
||||
return sprout::compost::formats::effect_right_holder<Adaptor>(adaptor);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference distance) {
|
||||
operator()(Adaptor const& adaptor, Difference distance) const {
|
||||
return sprout::adaptors::adapt_drop_holder<Adaptor, Difference>(adaptor, distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_drop_end_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference distance) {
|
||||
operator()(Adaptor const& adaptor, Difference distance) const {
|
||||
return sprout::adaptors::adapt_drop_end_holder<Adaptor, Difference>(adaptor, distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -64,12 +64,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference1, typename Difference2>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder<Adaptor, Difference1, Difference2>
|
||||
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, Difference1, Difference2>(adaptor, from_begin, from_end);
|
||||
}
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_offset_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference from_begin) {
|
||||
operator()(Adaptor const& adaptor, Difference from_begin) const {
|
||||
return sprout::adaptors::adapt_offset_holder<Adaptor, Difference>(adaptor, from_begin);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_take_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference distance) {
|
||||
operator()(Adaptor const& adaptor, Difference distance) const {
|
||||
return sprout::adaptors::adapt_take_holder<Adaptor, Difference>(adaptor, distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_take_end_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference distance) {
|
||||
operator()(Adaptor const& adaptor, Difference distance) const {
|
||||
return sprout::adaptors::adapt_take_end_holder<Adaptor, Difference>(adaptor, distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -64,12 +64,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Adaptor, typename Difference1, typename Difference2>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder<Adaptor, Difference1, Difference2>
|
||||
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, Difference1, Difference2>(adaptor, to_first, to_last);
|
||||
}
|
||||
template<typename Adaptor, typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adapt_window_holder<Adaptor, Difference>
|
||||
operator()(Adaptor const& adaptor, Difference to_first) {
|
||||
operator()(Adaptor const& adaptor, Difference to_first) const {
|
||||
return sprout::adaptors::adapt_window_holder<Adaptor, Difference>(adaptor, to_first);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Predicate>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::adjacent_filter_holder<Predicate>
|
||||
operator()(Predicate pred) {
|
||||
operator()(Predicate pred) const {
|
||||
return sprout::adaptors::adjacent_filter_holder<Predicate>(pred);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::alternate_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::alternate_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
|
|
@ -95,12 +95,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Value, typename Compare>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::clamp_holder<Value, Compare>
|
||||
operator()(Value const& low, Value const& up, Compare comp) {
|
||||
operator()(Value const& low, Value const& up, Compare comp) const {
|
||||
return sprout::adaptors::clamp_holder<Value, Compare>(low, up, comp);
|
||||
}
|
||||
template<typename Value>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::clamp_holder<Value>
|
||||
operator()(Value const& low, Value const& up) {
|
||||
operator()(Value const& low, Value const& up) const {
|
||||
return sprout::adaptors::clamp_holder<Value>(low, up);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Result>
|
||||
SPROUT_CONSTEXPR typename sprout::adaptors::copy_holder<Result const>
|
||||
operator()(Result const& result) {
|
||||
operator()(Result const& result) const {
|
||||
return typename sprout::adaptors::copy_holder<Result const>(result);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::drop_holder<Difference>
|
||||
operator()(Difference distance) {
|
||||
operator()(Difference distance) const {
|
||||
return sprout::adaptors::drop_holder<Difference>(distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::drop_end_holder<Difference>
|
||||
operator()(Difference distance) {
|
||||
operator()(Difference distance) const {
|
||||
return sprout::adaptors::drop_end_holder<Difference>(distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Predicate>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::filter_holder<Predicate>
|
||||
operator()(Predicate pred) {
|
||||
operator()(Predicate pred) const {
|
||||
return sprout::adaptors::filter_holder<Predicate>(pred);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Index>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::indexed_holder<Index>
|
||||
operator()(Index index) {
|
||||
operator()(Index index) const {
|
||||
return sprout::adaptors::indexed_holder<Index>(index);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::joint_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::joint_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::merge_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::merge_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
>
|
||||
operator()(RRange&& range, Compare comp) {
|
||||
operator()(RRange&& range, Compare comp) const {
|
||||
return sprout::adaptors::merge_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename... Adaptors>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::pipe_holder<Adaptors...>
|
||||
operator()(Adaptors const&... adaptors) {
|
||||
operator()(Adaptors const&... adaptors) const {
|
||||
return sprout::adaptors::pipe_holder<Adaptors...>(adaptors...);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::remove_holder<T>
|
||||
operator()(T const& value) {
|
||||
operator()(T const& value) const {
|
||||
return sprout::adaptors::remove_holder<T>(value);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Predicate>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::remove_if_holder<Predicate>
|
||||
operator()(Predicate pred) {
|
||||
operator()(Predicate pred) const {
|
||||
return sprout::adaptors::remove_if_holder<Predicate>(pred);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::replace_holder<T>
|
||||
operator()(T const& old_value, T const& new_value) {
|
||||
operator()(T const& old_value, T const& new_value) const {
|
||||
return sprout::adaptors::replace_holder<T>(old_value, new_value);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Predicate, typename T>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::replace_if_holder<Predicate, T>
|
||||
operator()(Predicate pred, T const& new_value) {
|
||||
operator()(Predicate pred, T const& new_value) const {
|
||||
return sprout::adaptors::replace_if_holder<Predicate, T>(pred, new_value);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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<Value>(frequency, amplitude, phase);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::set_difference_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::set_difference_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
>
|
||||
operator()(RRange&& range, Compare comp) {
|
||||
operator()(RRange&& range, Compare comp) const {
|
||||
return sprout::adaptors::set_difference_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::set_intersection_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::set_intersection_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
>
|
||||
operator()(RRange&& range, Compare comp) {
|
||||
operator()(RRange&& range, Compare comp) const {
|
||||
return sprout::adaptors::set_intersection_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::set_symmetric_difference_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::set_symmetric_difference_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::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<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR sprout::adaptors::set_union_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range) {
|
||||
operator()(RRange&& range) const {
|
||||
return sprout::adaptors::set_union_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>(
|
||||
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
>
|
||||
operator()(RRange&& range, Compare comp) {
|
||||
operator()(RRange&& range, Compare comp) const {
|
||||
return sprout::adaptors::set_union_holder<
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type,
|
||||
Compare
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace sprout {
|
|||
Value const& frequency = 1,
|
||||
Value const& amplitude = 1,
|
||||
Value const& phase = 0
|
||||
)
|
||||
) const
|
||||
{
|
||||
return sprout::adaptors::sinusoidal_range<Value>(frequency, amplitude, phase);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Size>
|
||||
SPROUT_CONSTEXPR typename sprout::adaptors::size_enum_holder<Size>
|
||||
operator()(Size size, bool omit_last = false) {
|
||||
operator()(Size size, bool omit_last = false) const {
|
||||
return typename sprout::adaptors::size_enum_holder<Size>(size, omit_last);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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<Value>(frequency, amplitude, phase, duty);
|
||||
}
|
||||
|
|
|
@ -86,12 +86,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::step_holder<Difference>
|
||||
operator()(Difference width) {
|
||||
operator()(Difference width) const {
|
||||
return sprout::adaptors::step_holder<Difference>(width);
|
||||
}
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::step_holder<Difference>
|
||||
operator()(Difference width, typename std::common_type<Difference>::type init) {
|
||||
operator()(Difference width, typename std::common_type<Difference>::type init) const {
|
||||
return sprout::adaptors::step_holder<Difference>(width, init);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::take_holder<Difference>
|
||||
operator()(Difference distance) {
|
||||
operator()(Difference distance) const {
|
||||
return sprout::adaptors::take_holder<Difference>(distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::take_end_holder<Difference>
|
||||
operator()(Difference distance) {
|
||||
operator()(Difference distance) const {
|
||||
return sprout::adaptors::take_end_holder<Difference>(distance);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace sprout {
|
|||
BinaryFunction,
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
>
|
||||
operator()(RRange&& range, BinaryFunction func) {
|
||||
operator()(RRange&& range, BinaryFunction func) const {
|
||||
return sprout::adaptors::transform_holder<
|
||||
BinaryFunction,
|
||||
typename std::remove_reference<typename sprout::lvalue_reference<RRange>::type>::type
|
||||
|
@ -147,7 +147,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename UnaryFunction>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::transform_holder<UnaryFunction>
|
||||
operator()(UnaryFunction func) {
|
||||
operator()(UnaryFunction func) const {
|
||||
return sprout::adaptors::transform_holder<UnaryFunction>(func);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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<Value>(frequency, amplitude, phase);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Predicate>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::unique_holder<Predicate>
|
||||
operator()(Predicate pred) {
|
||||
operator()(Predicate pred) const {
|
||||
return sprout::adaptors::unique_holder<Predicate>(pred);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::valued_holder<T>
|
||||
operator()(T const& param) {
|
||||
operator()(T const& param) const {
|
||||
return sprout::adaptors::valued_holder<T>(param);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -57,12 +57,12 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Difference1, typename Difference2>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::window_holder<Difference1, Difference2>
|
||||
operator()(Difference1 to_first, Difference2 to_last) {
|
||||
operator()(Difference1 to_first, Difference2 to_last) const {
|
||||
return sprout::adaptors::window_holder<Difference1, Difference2>(to_first, to_last);
|
||||
}
|
||||
template<typename Difference>
|
||||
SPROUT_CONSTEXPR sprout::adaptors::window_holder<Difference>
|
||||
operator()(Difference to_first) {
|
||||
operator()(Difference to_first) const {
|
||||
return sprout::adaptors::window_holder<Difference>(to_first);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_STRING_NPOS_HPP
|
||||
#define SPROUT_STRING_NPOS_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/is_uint.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
|
@ -11,6 +12,11 @@ namespace sprout {
|
|||
// npos
|
||||
//
|
||||
struct npos_t {
|
||||
public:
|
||||
template<typename UIntType, typename sprout::enabler_if<sprout::is_uint<UIntType>::value>::type = sprout::enabler>
|
||||
struct get
|
||||
: public std::integral_constant<UIntType, UIntType(-1)>
|
||||
{};
|
||||
public:
|
||||
template<typename UIntType, typename sprout::enabler_if<sprout::is_uint<UIntType>::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
|
||||
|
||||
//
|
||||
|
|
|
@ -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<size_type>::value;
|
||||
SPROUT_STATIC_CONSTEXPR size_type static_size = N;
|
||||
private:
|
||||
template<sprout::index_t... Indexes>
|
||||
|
|
|
@ -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<size_type>::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)
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue