add sprout/numeric/dft.wave.hpp

fix constexpr -> inline constexpr
This commit is contained in:
bolero-MURAKAMI 2012-07-15 16:04:05 +09:00
parent e4a4d17207
commit f9d4b475b4
69 changed files with 420 additions and 378 deletions

View file

@ -7,7 +7,7 @@
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
SPROUT_CONSTEXPR std::intmax_t imaxabs(std::intmax_t j) {
inline SPROUT_CONSTEXPR std::intmax_t imaxabs(std::intmax_t j) {
return j < 0 ? -j : j;
}
} // namespace sprout

View file

@ -32,7 +32,7 @@ namespace sprout {
sprout::detail::div_t_traits2<T>::offsetof_quot == 0
>::type = sprout::enabler
>
SPROUT_CONSTEXPR typename sprout::detail::div_t_traits2<T>::type div_impl2(T const& numer, T const& denom) {
inline SPROUT_CONSTEXPR typename sprout::detail::div_t_traits2<T>::type div_impl2(T const& numer, T const& denom) {
return {numer / denom, numer % denom};
}
@ -42,7 +42,7 @@ namespace sprout {
sprout::detail::div_t_traits2<T>::offsetof_rem == 0
>::type = sprout::enabler
>
SPROUT_CONSTEXPR typename sprout::detail::div_t_traits2<T>::type div_impl2(T const &numer, T const& denom) {
inline SPROUT_CONSTEXPR typename sprout::detail::div_t_traits2<T>::type div_impl2(T const &numer, T const& denom) {
return {numer % denom, numer / denom};
}
} // namespace detail
@ -55,7 +55,7 @@ namespace sprout {
typename T,
typename sprout::enabler_if<std::is_same<T, std::intmax_t>::value>::type = sprout::enabler
>
SPROUT_CONSTEXPR std::imaxdiv_t div(T numer, T denom) {
inline SPROUT_CONSTEXPR std::imaxdiv_t div(T numer, T denom) {
return sprout::imaxdiv(numer, denom);
}
} // namespace sprout

View file

@ -118,63 +118,63 @@ namespace sprout {
};
// 26.4.6, operators:
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs.real() + rhs.real(),
lhs.imag() + rhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& lhs, T const& rhs) {
return sprout::complex<T>(
lhs.real() + rhs,
lhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator+(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator+(T const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs + rhs.real(),
rhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs.real() - rhs.real(),
lhs.imag() - rhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& lhs, T const& rhs) {
return sprout::complex<T>(
lhs.real() - rhs,
lhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator-(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator-(T const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs - rhs.real(),
-rhs.imag()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator*(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator*(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs.real() * rhs.real() - lhs.imag() * rhs.imag(),
lhs.real() * rhs.imag() + lhs.imag() * rhs.real()
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator*(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator*(sprout::complex<T> const& lhs, T const& rhs) {
return sprout::complex<T>(
lhs.real() * rhs,
lhs.imag() * rhs
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator*(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator*(T const& lhs, sprout::complex<T> const& rhs) {
return sprout::complex<T>(
lhs * rhs.real(),
lhs * rhs.imag()
@ -182,7 +182,7 @@ namespace sprout {
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> divides_impl(
inline SPROUT_CONSTEXPR sprout::complex<T> divides_impl(
sprout::complex<T> const& lhs,
sprout::complex<T> const& rhs,
T const& n
@ -194,7 +194,7 @@ namespace sprout {
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> divides_impl(
inline SPROUT_CONSTEXPR sprout::complex<T> divides_impl(
T const& lhs,
sprout::complex<T> const& rhs,
T const& n
@ -207,50 +207,50 @@ namespace sprout {
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator/(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator/(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return sprout::detail::divides_impl(lhs, rhs, sprout::norm(rhs));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator/(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator/(sprout::complex<T> const& lhs, T const& rhs) {
return sprout::complex<T>(
lhs.real() / rhs,
lhs.imag() / rhs
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator/(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator/(T const& lhs, sprout::complex<T> const& rhs) {
return sprout::detail::divides_impl(lhs, rhs, sprout::norm(rhs));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator+(sprout::complex<T> const& x) {
return x;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> operator-(sprout::complex<T> const& x) {
return sprout::complex<T>(-x.real(), -x.imag());
}
template<typename T>
SPROUT_CONSTEXPR bool operator==(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR bool operator==(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return lhs.real() == rhs.real() && lhs.imag() == rhs.imag();
}
template<typename T>
SPROUT_CONSTEXPR bool operator==(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR bool operator==(sprout::complex<T> const& lhs, T const& rhs) {
return lhs.real() == rhs && lhs.imag() == T();
}
template<typename T>
SPROUT_CONSTEXPR bool operator==(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR bool operator==(T const& lhs, sprout::complex<T> const& rhs) {
return lhs == rhs.real() && T() == rhs.imag();
}
template<typename T>
SPROUT_CONSTEXPR bool operator!=(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR bool operator!=(sprout::complex<T> const& lhs, sprout::complex<T> const& rhs) {
return !(lhs == rhs);
}
template<typename T>
SPROUT_CONSTEXPR bool operator!=(sprout::complex<T> const& lhs, T const& rhs) {
inline SPROUT_CONSTEXPR bool operator!=(sprout::complex<T> const& lhs, T const& rhs) {
return !(lhs == rhs);
}
template<typename T>
SPROUT_CONSTEXPR bool operator!=(T const& lhs, sprout::complex<T> const& rhs) {
inline SPROUT_CONSTEXPR bool operator!=(T const& lhs, sprout::complex<T> const& rhs) {
return !(lhs == rhs);
}
template<typename T, typename Char, typename Traits>
@ -285,32 +285,32 @@ namespace sprout {
}
// 26.4.7, values:
template<typename T>
SPROUT_CONSTEXPR T real(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR T real(sprout::complex<T> const& x) {
return x.real();
}
template<typename T>
SPROUT_CONSTEXPR T imag(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR T imag(sprout::complex<T> const& x) {
return x.imag();
}
template<typename T>
SPROUT_CONSTEXPR T abs(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR T abs(sprout::complex<T> const& x) {
return sprout::sqrt(sprout::norm(x));
}
template<typename T>
SPROUT_CONSTEXPR T arg(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR T arg(sprout::complex<T> const& x) {
return sprout::atan2(x.imag(), x.real());
}
template<typename T>
SPROUT_CONSTEXPR T norm(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR T norm(sprout::complex<T> const& x) {
return x.real() * x.real() + x.imag() * x.imag();
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> conj(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> conj(sprout::complex<T> const& x) {
return sprout::complex<T>(x.real(), -x.imag());
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> proj_impl(sprout::complex<T> const& x, T const& den) {
inline SPROUT_CONSTEXPR sprout::complex<T> proj_impl(sprout::complex<T> const& x, T const& den) {
return sprout::complex<T>(
T(2) * x.real() / den,
T(2) * x.imag() / den
@ -318,14 +318,14 @@ namespace sprout {
}
} // detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> proj(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> proj(sprout::complex<T> const& x) {
return sprout::detail::proj_impl(
x,
sprout::norm(x) + T(1)
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> polar(T const& rho, T const& theta = 0) {
inline SPROUT_CONSTEXPR sprout::complex<T> polar(T const& rho, T const& theta = 0) {
return sprout::complex<T>(rho * sprout::cos(theta), rho * sprout::sin(theta));
}
// 26.4.8, transcendentals:
@ -369,27 +369,27 @@ namespace sprout {
SPROUT_CONSTEXPR sprout::complex<T> tanh(sprout::complex<T> const& x);
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> acos_impl(sprout::complex<T> const& t) {
inline SPROUT_CONSTEXPR sprout::complex<T> acos_impl(sprout::complex<T> const& t) {
return sprout::complex<T>(sprout::math::half_pi<T>() - t.real(), -t.imag());
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> acos(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> acos(sprout::complex<T> const& x) {
return sprout::detail::acos_impl(sprout::asin(x));
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> asin_impl(sprout::complex<T> const& t) {
inline SPROUT_CONSTEXPR sprout::complex<T> asin_impl(sprout::complex<T> const& t) {
return sprout::complex<T>(t.imag(), -t.real());
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> asin(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> asin(sprout::complex<T> const& x) {
return sprout::detail::asin_impl(sprout::asinh(sprout::complex<T>(-x.imag(), x.real())));
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atan_impl_1(
inline SPROUT_CONSTEXPR sprout::complex<T> atan_impl_1(
sprout::complex<T> const& x,
T const& r2,
T const& z,
@ -403,7 +403,7 @@ namespace sprout {
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atan_impl(
inline SPROUT_CONSTEXPR sprout::complex<T> atan_impl(
sprout::complex<T> const& x,
T const& r2
)
@ -418,15 +418,15 @@ namespace sprout {
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atan(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> atan(sprout::complex<T> const& x) {
return sprout::detail::atan_impl(x, x.real() * x.real());
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> acosh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> acosh(sprout::complex<T> const& x) {
return T(2) * sprout::log(sprout::sqrt(T(0.5) * (x + T(1))) + sprout::sqrt(T(0.5) * (x - T(1))));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> asinh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> asinh(sprout::complex<T> const& x) {
return sprout::log(
sprout::sqrt(
sprout::complex<T>(
@ -439,7 +439,7 @@ namespace sprout {
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atanh_impl_1(
inline SPROUT_CONSTEXPR sprout::complex<T> atanh_impl_1(
sprout::complex<T> const& x,
T const& i2,
T const& z,
@ -453,7 +453,7 @@ namespace sprout {
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atanh_impl(
inline SPROUT_CONSTEXPR sprout::complex<T> atanh_impl(
sprout::complex<T> const& x,
T const& i2
)
@ -468,69 +468,69 @@ namespace sprout {
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> atanh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> atanh(sprout::complex<T> const& x) {
return sprout::detail::atanh_impl(x, x.imag() * x.imag());
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> cos(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> cos(sprout::complex<T> const& x) {
return sprout::complex<T>(
sprout::cos(x.real()) * sprout::cosh(x.imag()),
-(sprout::sin(x.real()) * sprout::sinh(x.imag()))
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> cosh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> cosh(sprout::complex<T> const& x) {
return sprout::complex<T>(
sprout::cosh(x.real()) * sprout::cos(x.imag()),
sprout::sinh(x.real()) * sprout::sin(x.imag())
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> exp(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> exp(sprout::complex<T> const& x) {
return sprout::polar(sprout::exp(x.real()), x.imag());
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> log(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> log(sprout::complex<T> const& x) {
return sprout::complex<T>(sprout::log(sprout::abs(x)), sprout::arg(x));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> log10(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> log10(sprout::complex<T> const& x) {
return sprout::log(x) / sprout::log(T(10));
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> pow_impl(sprout::complex<T> const& t, T const& y) {
inline SPROUT_CONSTEXPR sprout::complex<T> pow_impl(sprout::complex<T> const& t, T const& y) {
return sprout::polar(sprout::exp(y * t.real()), y * t.imag());
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> pow(sprout::complex<T> const& x, T const& y) {
inline SPROUT_CONSTEXPR sprout::complex<T> pow(sprout::complex<T> const& x, T const& y) {
return x == T() ? T()
: x.imag() == T() && x.real() > T() ? sprout::pow(x.real(), y)
: sprout::detail::pow_impl(sprout::log(x), y)
;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> pow(sprout::complex<T> const& x, sprout::complex<T> const& y) {
inline SPROUT_CONSTEXPR sprout::complex<T> pow(sprout::complex<T> const& x, sprout::complex<T> const& y) {
return x == T() ? T()
: sprout::exp(y * sprout::log(x))
;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> pow(T const& x, sprout::complex<T> const& y) {
inline SPROUT_CONSTEXPR sprout::complex<T> pow(T const& x, sprout::complex<T> const& y) {
return x > T() ? sprout::polar(sprout::pow(x, y.real()), y.imag() * sprout::log(x))
: sprout::pow(sprout::complex<T>(x), y)
;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sin(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> sin(sprout::complex<T> const& x) {
return sprout::complex<T>(
sprout::sin(x.real()) * sprout::cosh(x.imag()),
sprout::cos(x.real()) * sprout::sinh(x.imag())
);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sinh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> sinh(sprout::complex<T> const& x) {
return sprout::complex<T>(
sprout::sinh(x.real()) * sprout::cos(x.imag()),
sprout::cosh(x.real()) * sprout::sin(x.imag())
@ -538,49 +538,49 @@ namespace sprout {
}
namespace detail {
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_1(sprout::complex<T> const& x, T const& t) {
inline SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_1(sprout::complex<T> const& x, T const& t) {
return sprout::complex<T>(t, x.imag() < T() ? -t : t);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_2_1(sprout::complex<T> const& x, T const& t, T const& u) {
inline SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_2_1(sprout::complex<T> const& x, T const& t, T const& u) {
return x.real() > T() ? sprout::complex<T>(u, x.imag() / t)
: sprout::complex<T>(sprout::abs(x.imag()) / t, x.imag() < T() ? -u : u)
;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_2(sprout::complex<T> const& x, T const& t) {
inline SPROUT_CONSTEXPR sprout::complex<T> sqrt_impl_2(sprout::complex<T> const& x, T const& t) {
return sprout::detail::sqrt_impl_2_1(x, t, t / 2);
}
} // namespace detail
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> sqrt(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> sqrt(sprout::complex<T> const& x) {
return x.real() == T() ? sprout::detail::sqrt_impl_1(x, sprout::sqrt(abs(x.imag()) / 2))
: sprout::detail::sqrt_impl_2(x, sprout::sqrt(2 * (sprout::abs(x) + sprout::abs(x.real()))))
;
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> tan(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> tan(sprout::complex<T> const& x) {
return sprout::sin(x) / sprout::cos(x);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> tanh(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> tanh(sprout::complex<T> const& x) {
return sprout::sinh(x) / sprout::cosh(x);
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> ceil(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> ceil(sprout::complex<T> const& x) {
return sprout::complex<T>(sprout::ceil(x.real()), sprout::ceil(x.imag()));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> floor(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> floor(sprout::complex<T> const& x) {
return sprout::complex<T>(sprout::floor(x.real()), sprout::floor(x.imag()));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> trunc(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> trunc(sprout::complex<T> const& x) {
return sprout::complex<T>(sprout::trunc(x.real()), sprout::trunc(x.imag()));
}
template<typename T>
SPROUT_CONSTEXPR sprout::complex<T> round(sprout::complex<T> const& x) {
inline SPROUT_CONSTEXPR sprout::complex<T> round(sprout::complex<T> const& x) {
return sprout::complex<T>(sprout::round(x.real()), sprout::round(x.imag()));
}
} // namespace sprout

View file

@ -14,7 +14,7 @@ namespace sprout {
namespace detail {
template<typename Container, typename... Args>
SPROUT_CONSTEXPR typename sprout::container_construct_traits<Container>::copied_type
inline SPROUT_CONSTEXPR typename sprout::container_construct_traits<Container>::copied_type
default_make_container(Args&&... args) {
typedef typename sprout::container_construct_traits<Container>::copied_type copied_type;
return copied_type{{sprout::forward<Args>(args)...}};

View file

@ -22,7 +22,7 @@ namespace sprout {
return sprout::begin(sprout::get_internal(cont));
}
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<
inline SPROUT_CONSTEXPR typename sprout::container_traits<
typename std::remove_reference<
typename sprout::containers::internal<Container const&>::type
>::type
@ -34,7 +34,7 @@ namespace sprout {
// internal_cbegin
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<
inline SPROUT_CONSTEXPR typename sprout::container_traits<
typename std::remove_reference<
typename sprout::containers::internal<Container const&>::type
>::type

View file

@ -12,7 +12,8 @@ namespace sprout {
// internal_begin_offset
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type internal_begin_offset(Container const& cont) {
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
internal_begin_offset(Container const& cont) {
return NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::begin(cont));
}
} // namespace sprout

View file

@ -12,7 +12,8 @@ namespace sprout {
// internal_begin_offset_backward
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type internal_begin_offset_backward(Container const& cont) {
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
internal_begin_offset_backward(Container const& cont) {
return NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::begin(cont), sprout::internal_end(cont));
}
} // namespace sprout

View file

@ -22,7 +22,7 @@ namespace sprout {
return sprout::end(sprout::get_internal(cont));
}
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<
inline SPROUT_CONSTEXPR typename sprout::container_traits<
typename std::remove_reference<
typename sprout::containers::internal<Container const&>::type
>::type
@ -34,7 +34,7 @@ namespace sprout {
// internal_cend
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<
inline SPROUT_CONSTEXPR typename sprout::container_traits<
typename std::remove_reference<
typename sprout::containers::internal<Container const&>::type
>::type

View file

@ -12,7 +12,8 @@ namespace sprout {
// internal_end_offset
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type internal_end_offset(Container const& cont) {
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
internal_end_offset(Container const& cont) {
return NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::internal_begin(cont), sprout::end(cont));
}
} // namespace sprout

View file

@ -12,7 +12,8 @@ namespace sprout {
// internal_end_offset_backward
//
template<typename Container>
SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type internal_end_offset_backward(Container const& cont) {
inline SPROUT_CONSTEXPR typename sprout::container_traits<Container>::difference_type
internal_end_offset_backward(Container const& cont) {
return NS_SSCRISK_CEL_OR_SPROUT::distance(sprout::end(cont), sprout::internal_end(cont));
}
} // namespace sprout

View file

@ -9,23 +9,23 @@ namespace sprout {
// Copyright (C) 2011 RiSK (sscrisk)
// 7.20.6.1 abs<62>Clabs<62>CyÑ llabs ŠÖ<C5A0>
SPROUT_CONSTEXPR int abs(int j) {
inline SPROUT_CONSTEXPR int abs(int j) {
return j < 0 ? -j : j;
}
SPROUT_CONSTEXPR long labs(long j) {
inline SPROUT_CONSTEXPR long labs(long j) {
return j < 0 ? -j : j;
}
SPROUT_CONSTEXPR long long llabs(long long j) {
inline SPROUT_CONSTEXPR long long llabs(long long j) {
return j < 0 ? -j : j;
}
SPROUT_CONSTEXPR long abs(long j) {
inline SPROUT_CONSTEXPR long abs(long j) {
return sprout::labs(j);
}
SPROUT_CONSTEXPR long long abs(long long j) {
inline SPROUT_CONSTEXPR long long abs(long long j) {
return sprout::llabs(j);
}
@ -36,7 +36,7 @@ namespace sprout {
std::is_integral<IntType>::value && std::is_signed<IntType>::value
>::type = sprout::enabler
>
SPROUT_CONSTEXPR IntType abs(IntType j) {
inline SPROUT_CONSTEXPR IntType abs(IntType j) {
return j < 0 ? -j : j;
}
template<
@ -45,7 +45,7 @@ namespace sprout {
std::is_integral<IntType>::value && std::is_unsigned<IntType>::value
>::type = sprout::enabler
>
SPROUT_CONSTEXPR IntType abs(IntType j) {
inline SPROUT_CONSTEXPR IntType abs(IntType j) {
return j;
}
} // anonymous-namespace

View file

@ -34,7 +34,7 @@ namespace sprout {
sprout::detail::div_t_traits<T>::offsetof_quot == 0
>::type = sprout::enabler
>
SPROUT_CONSTEXPR typename sprout::detail::div_t_traits<T>::type div_impl(T const& numer, T const& denom) {
inline SPROUT_CONSTEXPR typename sprout::detail::div_t_traits<T>::type div_impl(T const& numer, T const& denom) {
return {numer / denom, numer % denom};
}
@ -44,29 +44,29 @@ namespace sprout {
sprout::detail::div_t_traits<T>::offsetof_rem == 0
>::type = sprout::enabler
>
SPROUT_CONSTEXPR typename sprout::detail::div_t_traits<T>::type div_impl(T const &numer, T const& denom) {
inline SPROUT_CONSTEXPR typename sprout::detail::div_t_traits<T>::type div_impl(T const &numer, T const& denom) {
return {numer % denom, numer / denom};
}
} // namespace detail
// 7.20.6.2 div<69>Cldiv<69>CyÑ lldiv ŠÖ<C5A0>
SPROUT_CONSTEXPR std::div_t div(int numer, int denom) {
inline SPROUT_CONSTEXPR std::div_t div(int numer, int denom) {
return sprout::detail::div_impl(numer, denom);
}
SPROUT_CONSTEXPR std::ldiv_t ldiv(long numer, long denom) {
inline SPROUT_CONSTEXPR std::ldiv_t ldiv(long numer, long denom) {
return sprout::detail::div_impl(numer, denom);
}
SPROUT_CONSTEXPR std::lldiv_t lldiv(long long numer, long long denom) {
inline SPROUT_CONSTEXPR std::lldiv_t lldiv(long long numer, long long denom) {
return sprout::detail::div_impl(numer, denom);
}
SPROUT_CONSTEXPR std::ldiv_t div(long numer, long denom) {
inline SPROUT_CONSTEXPR std::ldiv_t div(long numer, long denom) {
return sprout::ldiv(numer, denom);
}
SPROUT_CONSTEXPR std::lldiv_t div(long long numer, long long denom) {
inline SPROUT_CONSTEXPR std::lldiv_t div(long long numer, long long denom) {
return sprout::lldiv(numer, denom);
}
} // namespace sprout

View file

@ -153,25 +153,25 @@ namespace sprout {
/* 0x7E '~' */ sprout::ascii::detail::graph | sprout::ascii::detail::print | sprout::ascii::detail::punct,
/* 0x7F DEL */ sprout::ascii::detail::cntrl
};
SPROUT_CONSTEXPR std::size_t get_value(char c) {
inline SPROUT_CONSTEXPR std::size_t get_value(char c) {
return static_cast<std::size_t>(c) < sprout::ascii::detail::table_size
? sprout::ascii::detail::table[static_cast<std::size_t>(c)]
: 0
;
}
SPROUT_CONSTEXPR std::size_t get_value(wchar_t c) {
inline SPROUT_CONSTEXPR std::size_t get_value(wchar_t c) {
return static_cast<std::size_t>(c) < sprout::ascii::detail::table_size
? sprout::ascii::detail::table[static_cast<std::size_t>(c)]
: 0
;
}
SPROUT_CONSTEXPR std::size_t get_value(char16_t c) {
inline SPROUT_CONSTEXPR std::size_t get_value(char16_t c) {
return static_cast<std::size_t>(c) < sprout::ascii::detail::table_size
? sprout::ascii::detail::table[static_cast<std::size_t>(c)]
: 0
;
}
SPROUT_CONSTEXPR std::size_t get_value(char32_t c) {
inline SPROUT_CONSTEXPR std::size_t get_value(char32_t c) {
return static_cast<std::size_t>(c) < sprout::ascii::detail::table_size
? sprout::ascii::detail::table[static_cast<std::size_t>(c)]
: 0
@ -180,46 +180,46 @@ namespace sprout {
} // namespace detail
#define SPROUT_CTYPE_ASCII_DECL(CHAR_TYPE, PREFIX) \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alnum))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alnum))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & (sprout::ascii::detail::alpha | sprout::ascii::detail::digit); \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alpha))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, alpha))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::alpha; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, blank))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, blank))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::blank; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, cntrl))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, cntrl))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::cntrl; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, digit))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, digit))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::digit; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, graph))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, graph))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::graph; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, print))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, print))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::print; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, punct))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, punct))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::punct; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, space))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, space))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::space; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper; \
} \
SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, xdigit))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR bool SPROUT_PP_CAT(is, SPROUT_PP_CAT(PREFIX, xdigit))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::xdigit; \
} \
SPROUT_CONSTEXPR CHAR_TYPE SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR CHAR_TYPE SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, lower))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::lower ? c + (0x61 - 0x41) : c; \
} \
SPROUT_CONSTEXPR CHAR_TYPE SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \
inline SPROUT_CONSTEXPR CHAR_TYPE SPROUT_PP_CAT(to, SPROUT_PP_CAT(PREFIX, upper))(CHAR_TYPE c) { \
return sprout::ascii::detail::get_value(c) & sprout::ascii::detail::upper ? c - (0x61 - 0x41) : c; \
}

View file

@ -34,9 +34,8 @@ namespace sprout {
// get
//
template<std::size_t I, typename T>
SPROUT_CONSTEXPR auto get(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<I>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto get(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::tuples::get<I>(sprout::forward<T>(t))))
-> decltype(sprout::tuples::get<I>(sprout::forward<T>(t)))
{
return sprout::tuples::get<I>(sprout::forward<T>(t));

View file

@ -19,33 +19,29 @@ namespace sprout {
// a
//
template<typename T>
SPROUT_CONSTEXPR auto r(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto r(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<0>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<0>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto g(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto g(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<1>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<1>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto b(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto b(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<2>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<2>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto a(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto a(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<3>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<3>(sprout::forward<T>(t));

View file

@ -17,25 +17,22 @@ namespace sprout {
// z
//
template<typename T>
SPROUT_CONSTEXPR auto x(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto x(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<0>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<0>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto y(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto y(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<1>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<1>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto z(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto z(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<2>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<2>(sprout::forward<T>(t));
@ -179,7 +176,7 @@ namespace sprout {
// normal_to_color
//
template<typename Color, typename Normal>
SPROUT_CONSTEXPR Color normal_to_color(Normal const& nor) {
inline SPROUT_CONSTEXPR Color normal_to_color(Normal const& nor) {
return sprout::tuples::make<Color>(
0.5 + sprout::darkroom::coords::x(nor) * 0.5,
0.5 + sprout::darkroom::coords::y(nor) * 0.5,

View file

@ -19,41 +19,36 @@ namespace sprout {
// material
//
template<typename T>
SPROUT_CONSTEXPR auto does_intersect(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto does_intersect(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<0>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<0>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto distance(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto distance(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<1>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<1>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto point_of_intersection(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto point_of_intersection(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<2>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<2>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<2>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto normal(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto normal(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<3>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<3>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<3>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto material(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<4>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto material(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<4>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<4>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<4>(sprout::forward<T>(t));
@ -63,7 +58,7 @@ namespace sprout {
// make_intersection
//
template<typename Distance, typename Point, typename Normal, typename Material>
SPROUT_CONSTEXPR sprout::tuples::tuple<bool, Distance, Point, Normal, Material>
inline SPROUT_CONSTEXPR sprout::tuples::tuple<bool, Distance, Point, Normal, Material>
make_intersection(bool b, Distance const& dist, Point const& p, Normal const& nor, Material const& mat) {
return sprout::tuples::make_tuple(b, dist, p, nor, mat);
}

View file

@ -15,17 +15,15 @@ namespace sprout {
// reflection
//
template<typename T>
SPROUT_CONSTEXPR auto color(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto color(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<0>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<0>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto reflection(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto reflection(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<1>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<1>(sprout::forward<T>(t));
@ -36,13 +34,13 @@ namespace sprout {
// calc_reflection
//
template<typename Image, typename Unit>
SPROUT_CONSTEXPR auto calc_color(Image&& t, Unit const& u, Unit const& v) SPROUT_NOEXCEPT
inline SPROUT_CONSTEXPR auto calc_color(Image&& t, Unit const& u, Unit const& v) SPROUT_NOEXCEPT
-> decltype(sprout::forward<Image>(t).template operator()(u, v))
{
return sprout::forward<Image>(t).template operator()(u, v);
}
template<typename Image, typename Unit>
SPROUT_CONSTEXPR auto calc_reflection(Image&& t, Unit const& u, Unit const& v) SPROUT_NOEXCEPT
inline SPROUT_CONSTEXPR auto calc_reflection(Image&& t, Unit const& u, Unit const& v) SPROUT_NOEXCEPT
-> decltype(sprout::forward<Image>(t).template operator()(u, v))
{
return sprout::forward<Image>(t).template operator()(u, v);
@ -52,7 +50,7 @@ namespace sprout {
// calc_material
//
template<typename Material, typename Unit>
SPROUT_CONSTEXPR auto calc_material(Material const& mat, Unit const& u, Unit const& v)
inline SPROUT_CONSTEXPR auto calc_material(Material const& mat, Unit const& u, Unit const& v)
-> decltype(sprout::tuples::make_tuple(
sprout::darkroom::materials::calc_color(sprout::darkroom::materials::color(mat), u, v),
sprout::darkroom::materials::calc_reflection(sprout::darkroom::materials::reflection(mat), u, v)
@ -68,7 +66,7 @@ namespace sprout {
// make_material_image
//
template<typename ColorImage, typename ReflectionImage>
SPROUT_CONSTEXPR sprout::tuples::tuple<ColorImage, ReflectionImage>
inline SPROUT_CONSTEXPR sprout::tuples::tuple<ColorImage, ReflectionImage>
make_material_image(ColorImage const& col, ReflectionImage const& ref) {
return sprout::tuples::make_tuple(col, ref);
}

View file

@ -63,12 +63,12 @@ namespace sprout {
// make_plaid
//
template<typename Element>
SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element<Element>
inline SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element<Element>
make_plaid(Element const& elem1, Element const& elem2) {
return sprout::darkroom::materials::plaid_element<Element>(elem1, elem2);
}
template<typename Element, typename Unit>
SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element<Element>
inline SPROUT_CONSTEXPR sprout::darkroom::materials::plaid_element<Element>
make_plaid(Element const& elem1, Element const& elem2, Unit const& scale) {
return sprout::darkroom::materials::plaid_element<Element, Unit>(elem1, elem2, scale);
}
@ -76,7 +76,7 @@ namespace sprout {
// make_plaid_material_image
//
template<typename Color, typename Reflection>
SPROUT_CONSTEXPR sprout::tuples::tuple<
inline SPROUT_CONSTEXPR sprout::tuples::tuple<
sprout::darkroom::materials::plaid_element<Color>,
sprout::darkroom::materials::plaid_element<Reflection>
> make_plaid_material_image(
@ -92,7 +92,7 @@ namespace sprout {
);
}
template<typename Color, typename Reflection, typename Unit>
SPROUT_CONSTEXPR sprout::tuples::tuple<
inline SPROUT_CONSTEXPR sprout::tuples::tuple<
sprout::darkroom::materials::plaid_element<Color, Unit>,
sprout::darkroom::materials::plaid_element<Reflection, Unit>
> make_plaid_material_image(

View file

@ -162,12 +162,12 @@ namespace sprout {
// make_texture_map
//
template<typename Texture>
SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map<Texture>
inline SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map<Texture>
make_texture_map(Texture const& texture) {
return sprout::darkroom::materials::texture_map<Texture>(texture);
}
template<typename Texture, typename Unit>
SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map<Texture, Unit>
inline SPROUT_CONSTEXPR sprout::darkroom::materials::texture_map<Texture, Unit>
make_texture_map(
Texture const& texture,
Unit const& scale,

View file

@ -29,7 +29,7 @@ namespace sprout {
// make_uniform
//
template<typename Element>
SPROUT_CONSTEXPR sprout::darkroom::materials::uniform_element<Element>
inline SPROUT_CONSTEXPR sprout::darkroom::materials::uniform_element<Element>
make_uniform(Element const& elem) {
return sprout::darkroom::materials::uniform_element<Element>(elem);
}
@ -37,7 +37,7 @@ namespace sprout {
// make_uniform_material_image
//
template<typename Color, typename Reflection>
SPROUT_CONSTEXPR sprout::tuples::tuple<
inline SPROUT_CONSTEXPR sprout::tuples::tuple<
sprout::darkroom::materials::uniform_element<Color>,
sprout::darkroom::materials::uniform_element<Reflection>
> make_uniform_material_image(Color const& col, Reflection const& ref) {

View file

@ -15,17 +15,15 @@ namespace sprout {
// direction
//
template<typename T>
SPROUT_CONSTEXPR auto position(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto position(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<0>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<0>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<0>(sprout::forward<T>(t));
}
template<typename T>
SPROUT_CONSTEXPR auto direction(
T&& t
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
inline SPROUT_CONSTEXPR auto direction(T&& t)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::darkroom::access::get<1>(sprout::forward<T>(t))))
-> decltype(sprout::darkroom::access::get<1>(sprout::forward<T>(t)))
{
return sprout::darkroom::access::get<1>(sprout::forward<T>(t));
@ -35,7 +33,7 @@ namespace sprout {
// make_ray
//
template<typename Position, typename Direction>
SPROUT_CONSTEXPR sprout::tuples::tuple<Position, Direction>
inline SPROUT_CONSTEXPR sprout::tuples::tuple<Position, Direction>
make_ray(Position const& pos, Direction const& dir) {
return sprout::tuples::make_tuple(pos, dir);
}

View file

@ -11,7 +11,7 @@ namespace sprout {
// count_n
//
template<typename InputIterator, typename Size, typename T>
SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type count_n(
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type count_n(
InputIterator first,
Size n,
T const& value

View file

@ -11,7 +11,7 @@ namespace sprout {
// count_n_if
//
template<typename InputIterator, typename Size, typename Predicate>
SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type count_n_if(
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type count_n_if(
InputIterator first,
Size n,
Predicate pred

View file

@ -26,7 +26,7 @@ namespace sprout {
// D.9.2 bind1st
template<typename Fn, typename T>
SPROUT_CONSTEXPR sprout::binder1st<Fn> bind1st(Fn const& fn, T const& x) {
inline SPROUT_CONSTEXPR sprout::binder1st<Fn> bind1st(Fn const& fn, T const& x) {
return sprout::binder1st<Fn>(fn, typename Fn::first_argument_type(x));
}
} // namespace sprout

View file

@ -26,7 +26,7 @@ namespace sprout {
// D.9.4 bind2nd
template<typename Fn, typename T>
SPROUT_CONSTEXPR sprout::binder2nd<Fn> bind2nd(Fn const& op, T const& x) {
inline SPROUT_CONSTEXPR sprout::binder2nd<Fn> bind2nd(Fn const& op, T const& x) {
return sprout::binder2nd<Fn>(op, typename Fn::second_argument_type(x));
}
} // namespace sprout

View file

@ -41,7 +41,7 @@ namespace sprout {
namespace hash_detail {
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) {
inline SPROUT_CONSTEXPR std::size_t hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) {
return i > 0
? hash_value_signed_2(
val,
@ -54,11 +54,11 @@ namespace sprout {
;
}
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_signed_1(T val, int length, std::size_t seed, T positive) {
inline SPROUT_CONSTEXPR std::size_t hash_value_signed_1(T val, int length, std::size_t seed, T positive) {
return hash_value_signed_2(val, length, seed, positive, length * std::numeric_limits<std::size_t>::digits);
}
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_signed(T val) {
inline SPROUT_CONSTEXPR std::size_t hash_value_signed(T val) {
return sprout::hash_detail::hash_value_signed_1(
val,
(std::numeric_limits<T>::digits - 1) / std::numeric_limits<std::size_t>::digits,
@ -68,7 +68,7 @@ namespace sprout {
}
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) {
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) {
return i > 0
? hash_value_unsigned_2(
val,
@ -80,11 +80,11 @@ namespace sprout {
;
}
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_unsigned_1(T val, int length, std::size_t seed) {
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned_1(T val, int length, std::size_t seed) {
return hash_value_unsigned_2(val, length, seed, length * std::numeric_limits<std::size_t>::digits);
}
template<typename T>
SPROUT_CONSTEXPR std::size_t hash_value_unsigned(T val) {
inline SPROUT_CONSTEXPR std::size_t hash_value_unsigned(T val) {
return sprout::hash_detail::hash_value_unsigned_1(
val,
(std::numeric_limits<T>::digits - 1) / std::numeric_limits<std::size_t>::digits,

View file

@ -8,7 +8,7 @@
namespace sprout {
template<typename T, std::size_t N>
SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::array<T, N> const& v) {
inline SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::array<T, N> const& v) {
return sprout::hash_range(v.begin(), v.end());
}
} // namespace sprout

View file

@ -8,7 +8,7 @@
namespace sprout {
template<typename T1, typename T2>
SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::pair<T1, T2> const& v) {
inline SPROUT_CONSTEXPR std::size_t hash_value(sscrisk::cel::pair<T1, T2> const& v) {
return sprout::hash_combine(sprout::hash_combine(0, v.first), v.second);
}
} // namespace sprout

View file

@ -29,7 +29,7 @@ namespace sprout {
}
};
template<typename Fn, typename T>
SPROUT_CONSTEXPR sprout::binder1st_<typename std::decay<Fn>::type, typename std::decay<T>::type>
inline SPROUT_CONSTEXPR sprout::binder1st_<typename std::decay<Fn>::type, typename std::decay<T>::type>
bind1st_(Fn&& fn, T&& x) {
typedef sprout::binder1st_<typename std::decay<Fn>::type, typename std::decay<T>::type> type;
return type(sprout::forward<Fn>(fn), sprout::forward<T>(x));

View file

@ -29,7 +29,7 @@ namespace sprout {
}
};
template<typename Fn, typename T>
SPROUT_CONSTEXPR sprout::binder2nd_<typename std::decay<Fn>::type, typename std::decay<T>::type>
inline SPROUT_CONSTEXPR sprout::binder2nd_<typename std::decay<Fn>::type, typename std::decay<T>::type>
bind2nd_(Fn&& fn, T&& x) {
typedef sprout::binder2nd_<typename std::decay<Fn>::type, typename std::decay<T>::type> type;
return type(sprout::forward<Fn>(fn), sprout::forward<T>(x));

View file

@ -59,7 +59,7 @@ namespace sprout {
// bit_length
//
template<typename IntType>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_integral<IntType>::value,
IntType
>::type bit_length(IntType x) {

View file

@ -63,7 +63,7 @@ namespace sprout {
// bit_reverse_in
//
template <typename IntType>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_integral<IntType>::value,
IntType
>::type bit_reverse_in(IntType x, std::size_t length) {

View file

@ -212,7 +212,7 @@ namespace sprout {
// distance
//
template<typename Iterator, typename Traits>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::bytes_iterator<Iterator, Traits> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::bytes_iterator<Iterator, Traits> >::difference_type
distance(
sprout::bytes_iterator<Iterator, Traits> first,
sprout::bytes_iterator<Iterator, Traits> last

View file

@ -184,7 +184,7 @@ namespace sprout {
// swap
//
template<typename Incrementable>
void swap(sprout::counting_iterator<Incrementable>& lhs, sprout::counting_iterator<Incrementable>& rhs)
inline void swap(sprout::counting_iterator<Incrementable>& lhs, sprout::counting_iterator<Incrementable>& rhs)
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
{
lhs.swap(rhs);
@ -194,14 +194,14 @@ namespace sprout {
// next
//
template<typename Incrementable>
SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> next(
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> next(
sprout::counting_iterator<Incrementable> const& it
)
{
return it.next();
}
template<typename Incrementable>
SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> next(
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> next(
sprout::counting_iterator<Incrementable> const& it,
typename sprout::counting_iterator<Incrementable>::difference_type n
)
@ -213,14 +213,14 @@ namespace sprout {
// prev
//
template<typename Incrementable>
SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> prev(
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> prev(
sprout::counting_iterator<Incrementable> const& it
)
{
return it.prev();
}
template<typename Incrementable>
SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> prev(
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable> prev(
sprout::counting_iterator<Incrementable> const& it,
typename sprout::counting_iterator<Incrementable>::difference_type n
)
@ -232,7 +232,7 @@ namespace sprout {
// distance
//
template<typename Incrementable>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::counting_iterator<Incrementable> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::counting_iterator<Incrementable> >::difference_type
distance(
sprout::counting_iterator<Incrementable> first,
sprout::counting_iterator<Incrementable> last

View file

@ -10,14 +10,14 @@ namespace sprout {
// Copyright (C) 2011 RiSK (sscrisk)
template<typename InputIterator>
SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
distance(InputIterator first, InputIterator last) {
return first == last ? 0
: 1 + sprout::detail::distance(sprout::next(first), last)
;
}
template<typename InputIterator>
SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
distance_impl(InputIterator first, InputIterator last) {
using sprout::detail::distance;
return distance(first, last);
@ -27,7 +27,7 @@ namespace sprout {
// distance
//
template<typename InputIterator>
SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<InputIterator>::difference_type
distance(InputIterator first, InputIterator last) {
return sprout::detail::distance_impl(first, last);
}

View file

@ -171,7 +171,7 @@ namespace sprout {
// swap
//
template<typename Container>
void swap(sprout::index_iterator<Container>& lhs, sprout::index_iterator<Container>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::index_iterator<Container>& lhs, sprout::index_iterator<Container>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -199,14 +199,14 @@ namespace sprout {
// next
//
template<typename Container>
SPROUT_CONSTEXPR sprout::index_iterator<Container> next(
inline SPROUT_CONSTEXPR sprout::index_iterator<Container> next(
sprout::index_iterator<Container> const& it
)
{
return it.next();
}
template<typename Container>
SPROUT_CONSTEXPR sprout::index_iterator<Container> next(
inline SPROUT_CONSTEXPR sprout::index_iterator<Container> next(
sprout::index_iterator<Container> const& it,
typename sprout::index_iterator<Container>::difference_type n
)
@ -218,14 +218,14 @@ namespace sprout {
// prev
//
template<typename Container>
SPROUT_CONSTEXPR sprout::index_iterator<Container> prev(
inline SPROUT_CONSTEXPR sprout::index_iterator<Container> prev(
sprout::index_iterator<Container> const& it
)
{
return it.prev();
}
template<typename Container>
SPROUT_CONSTEXPR sprout::index_iterator<Container> prev(
inline SPROUT_CONSTEXPR sprout::index_iterator<Container> prev(
sprout::index_iterator<Container> const& it,
typename sprout::index_iterator<Container>::difference_type n
)
@ -237,7 +237,7 @@ namespace sprout {
// distance
//
template<typename Container>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::index_iterator<Container> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::index_iterator<Container> >::difference_type
distance(
sprout::index_iterator<Container> first,
sprout::index_iterator<Container> last

View file

@ -9,7 +9,7 @@
namespace sprout {
namespace detail {
template<typename RandomAccessIterator>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_literal_type<typename std::decay<RandomAccessIterator>::type>::value,
typename std::decay<RandomAccessIterator>::type
>::type next_impl(
@ -20,7 +20,7 @@ namespace sprout {
return sprout::forward<RandomAccessIterator>(it) + 1;
}
template<typename ForwardIterator>
SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next_impl(
inline SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next_impl(
ForwardIterator&& it,
void*
)
@ -29,7 +29,7 @@ namespace sprout {
}
template<typename RandomAccessIterator>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_literal_type<typename std::decay<RandomAccessIterator>::type>::value,
typename std::decay<RandomAccessIterator>::type
>::type next_impl(
@ -41,7 +41,7 @@ namespace sprout {
return sprout::forward<RandomAccessIterator>(it) + n;
}
template<typename ForwardIterator>
SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next_impl(
inline SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next_impl(
ForwardIterator it,
typename std::iterator_traits<typename std::decay<ForwardIterator>::type>::difference_type n,
void*
@ -54,7 +54,8 @@ namespace sprout {
// next
//
template<typename ForwardIterator>
SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next(ForwardIterator&& it) {
inline SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type
next(ForwardIterator&& it) {
typedef typename std::iterator_traits<typename std::decay<ForwardIterator>::type>::iterator_category* category;
return sprout::detail::next_impl(
sprout::forward<ForwardIterator>(it),
@ -62,11 +63,8 @@ namespace sprout {
);
}
template<typename ForwardIterator>
SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type next(
ForwardIterator&& it,
typename std::iterator_traits<typename std::decay<ForwardIterator>::type>::difference_type n
)
{
inline SPROUT_CONSTEXPR typename std::decay<ForwardIterator>::type
next(ForwardIterator&& it, typename std::iterator_traits<typename std::decay<ForwardIterator>::type>::difference_type n) {
typedef typename std::iterator_traits<typename std::decay<ForwardIterator>::type>::iterator_category* category;
return sprout::detail::next_impl(
sprout::forward<ForwardIterator>(it),

View file

@ -9,7 +9,7 @@
namespace sprout {
namespace detail {
template<typename RandomAccessIterator>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_literal_type<typename std::decay<RandomAccessIterator>::type>::value,
typename std::decay<RandomAccessIterator>::type
>::type prev_impl(
@ -20,7 +20,7 @@ namespace sprout {
return sprout::forward<RandomAccessIterator>(it) - 1;
}
template<typename BidirectionalIterator>
SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev_impl(
inline SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev_impl(
BidirectionalIterator&& it,
void*
)
@ -29,7 +29,7 @@ namespace sprout {
}
template<typename RandomAccessIterator>
SPROUT_CONSTEXPR typename std::enable_if<
inline SPROUT_CONSTEXPR typename std::enable_if<
std::is_literal_type<typename std::decay<RandomAccessIterator>::type>::value,
typename std::decay<RandomAccessIterator>::type
>::type prev_impl(
@ -41,7 +41,7 @@ namespace sprout {
return sprout::forward<RandomAccessIterator>(it) - n;
}
template<typename BidirectionalIterator>
SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev_impl(
inline SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev_impl(
BidirectionalIterator it,
typename std::iterator_traits<typename std::decay<BidirectionalIterator>::type>::difference_type n,
void*
@ -54,7 +54,8 @@ namespace sprout {
// prev
//
template<typename BidirectionalIterator>
SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev(BidirectionalIterator&& it) {
inline SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type
prev(BidirectionalIterator&& it) {
typedef typename std::iterator_traits<typename std::decay<BidirectionalIterator>::type>::iterator_category* category;
return sprout::detail::prev_impl(
sprout::forward<BidirectionalIterator>(it),
@ -62,11 +63,8 @@ namespace sprout {
);
}
template<typename BidirectionalIterator>
SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type prev(
BidirectionalIterator&& it,
typename std::iterator_traits<typename std::decay<BidirectionalIterator>::type>::difference_type n
)
{
inline SPROUT_CONSTEXPR typename std::decay<BidirectionalIterator>::type
prev(BidirectionalIterator&& it, typename std::iterator_traits<typename std::decay<BidirectionalIterator>::type>::difference_type n) {
typedef typename std::iterator_traits<typename std::decay<BidirectionalIterator>::type>::iterator_category* category;
return sprout::detail::prev_impl(
sprout::forward<BidirectionalIterator>(it),

View file

@ -120,7 +120,7 @@ namespace sprout {
};
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -128,7 +128,7 @@ namespace sprout {
return lhs.base() == rhs.base();
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -136,7 +136,7 @@ namespace sprout {
return !(lhs == rhs);
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -144,7 +144,7 @@ namespace sprout {
return lhs.base() < rhs.base();
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -152,7 +152,7 @@ namespace sprout {
return rhs < lhs;
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -160,7 +160,7 @@ namespace sprout {
return !(rhs < lhs);
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -168,7 +168,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
inline SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
sprout::reverse_iterator<Iterator1> const& lhs,
sprout::reverse_iterator<Iterator2> const& rhs
)
@ -176,7 +176,7 @@ namespace sprout {
return lhs.base() - rhs.base();
}
template<typename Iterator>
SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> operator+(
inline SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> operator+(
typename sprout::reverse_iterator<Iterator>::difference_type n,
sprout::reverse_iterator<Iterator> const& it
)
@ -188,7 +188,7 @@ namespace sprout {
// swap
//
template<typename Iterator>
void swap(sprout::reverse_iterator<Iterator>& lhs, sprout::reverse_iterator<Iterator>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::reverse_iterator<Iterator>& lhs, sprout::reverse_iterator<Iterator>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -196,14 +196,14 @@ namespace sprout {
// next
//
template<typename Iterator>
SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> next(
inline SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> next(
sprout::reverse_iterator<Iterator> const& it
)
{
return it.next();
}
template<typename Iterator>
SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> next(
inline SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> next(
sprout::reverse_iterator<Iterator> const& it,
typename sprout::reverse_iterator<Iterator>::difference_type n
)
@ -215,14 +215,14 @@ namespace sprout {
// prev
//
template<typename Iterator>
SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> prev(
inline SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> prev(
sprout::reverse_iterator<Iterator> const& it
)
{
return it.prev();
}
template<typename Iterator>
SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> prev(
inline SPROUT_CONSTEXPR sprout::reverse_iterator<Iterator> prev(
sprout::reverse_iterator<Iterator> const& it,
typename sprout::reverse_iterator<Iterator>::difference_type n
)
@ -234,7 +234,7 @@ namespace sprout {
// distance
//
template<typename Iterator>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::reverse_iterator<Iterator> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::reverse_iterator<Iterator> >::difference_type
distance(
sprout::reverse_iterator<Iterator> first,
sprout::reverse_iterator<Iterator> last

View file

@ -146,7 +146,7 @@ namespace sprout {
};
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -154,7 +154,7 @@ namespace sprout {
return lhs.index() == rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -162,7 +162,7 @@ namespace sprout {
return !(lhs == rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -170,7 +170,7 @@ namespace sprout {
return lhs.index() < rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -178,7 +178,7 @@ namespace sprout {
return rhs < lhs;
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -186,7 +186,7 @@ namespace sprout {
return !(rhs < lhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -194,7 +194,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR typename sprout::sawtooth_iterator<Value1>::difference_type operator-(
inline SPROUT_CONSTEXPR typename sprout::sawtooth_iterator<Value1>::difference_type operator-(
sprout::sawtooth_iterator<Value1> const& lhs,
sprout::sawtooth_iterator<Value2> const& rhs
)
@ -202,7 +202,7 @@ namespace sprout {
return lhs.index() - rhs.index();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> operator+(
inline SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> operator+(
typename sprout::sawtooth_iterator<Value>::difference_type n,
sprout::sawtooth_iterator<Value> const& it
)
@ -214,7 +214,7 @@ namespace sprout {
// swap
//
template<typename Value>
void swap(sprout::sawtooth_iterator<Value>& lhs, sprout::sawtooth_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::sawtooth_iterator<Value>& lhs, sprout::sawtooth_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -222,14 +222,14 @@ namespace sprout {
// next
//
template<typename Value>
SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> next(
sprout::sawtooth_iterator<Value> const& it
)
{
return it.next();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> next(
sprout::sawtooth_iterator<Value> const& it,
typename sprout::sawtooth_iterator<Value>::difference_type n
)
@ -241,14 +241,14 @@ namespace sprout {
// prev
//
template<typename Value>
SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> prev(
sprout::sawtooth_iterator<Value> const& it
)
{
return it.prev();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::sawtooth_iterator<Value> prev(
sprout::sawtooth_iterator<Value> const& it,
typename sprout::sawtooth_iterator<Value>::difference_type n
)
@ -260,7 +260,7 @@ namespace sprout {
// distance
//
template<typename Value>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::sawtooth_iterator<Value> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::sawtooth_iterator<Value> >::difference_type
distance(
sprout::sawtooth_iterator<Value> first,
sprout::sawtooth_iterator<Value> last

View file

@ -155,7 +155,7 @@ namespace sprout {
};
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -163,7 +163,7 @@ namespace sprout {
return lhs.index() == rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -171,7 +171,7 @@ namespace sprout {
return !(lhs == rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -179,7 +179,7 @@ namespace sprout {
return lhs.index() < rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -187,7 +187,7 @@ namespace sprout {
return rhs < lhs;
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -195,7 +195,7 @@ namespace sprout {
return !(rhs < lhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -203,7 +203,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR typename sprout::sinusoid_iterator<Value1>::difference_type operator-(
inline SPROUT_CONSTEXPR typename sprout::sinusoid_iterator<Value1>::difference_type operator-(
sprout::sinusoid_iterator<Value1> const& lhs,
sprout::sinusoid_iterator<Value2> const& rhs
)
@ -211,7 +211,7 @@ namespace sprout {
return lhs.index() - rhs.index();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> operator+(
inline SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> operator+(
typename sprout::sinusoid_iterator<Value>::difference_type n,
sprout::sinusoid_iterator<Value> const& it
)
@ -223,7 +223,7 @@ namespace sprout {
// swap
//
template<typename Value>
void swap(sprout::sinusoid_iterator<Value>& lhs, sprout::sinusoid_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::sinusoid_iterator<Value>& lhs, sprout::sinusoid_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -231,14 +231,14 @@ namespace sprout {
// next
//
template<typename Value>
SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> next(
sprout::sinusoid_iterator<Value> const& it
)
{
return it.next();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> next(
sprout::sinusoid_iterator<Value> const& it,
typename sprout::sinusoid_iterator<Value>::difference_type n
)
@ -250,14 +250,14 @@ namespace sprout {
// prev
//
template<typename Value>
SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> prev(
sprout::sinusoid_iterator<Value> const& it
)
{
return it.prev();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::sinusoid_iterator<Value> prev(
sprout::sinusoid_iterator<Value> const& it,
typename sprout::sinusoid_iterator<Value>::difference_type n
)
@ -269,7 +269,7 @@ namespace sprout {
// distance
//
template<typename Value>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::sinusoid_iterator<Value> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::sinusoid_iterator<Value> >::difference_type
distance(
sprout::sinusoid_iterator<Value> first,
sprout::sinusoid_iterator<Value> last

View file

@ -266,7 +266,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -277,7 +277,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -288,7 +288,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -301,7 +301,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -312,7 +312,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -323,7 +323,7 @@ namespace sprout {
typename Iterator1, bool Separated1,
typename Iterator2, bool Separated2
>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::size_enum_iterator<Iterator1, Separated1> const& lhs,
sprout::size_enum_iterator<Iterator2, Separated2> const& rhs
)
@ -331,7 +331,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
inline SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
sprout::size_enum_iterator<Iterator1> const& lhs,
sprout::size_enum_iterator<Iterator2> const& rhs
)
@ -339,7 +339,7 @@ namespace sprout {
return lhs.base() - rhs.base();
}
template<typename Iterator1, typename Iterator2>
SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
inline SPROUT_CONSTEXPR decltype(std::declval<Iterator1>() - std::declval<Iterator2>()) operator-(
sprout::size_enum_iterator<Iterator1, true> const& lhs,
sprout::size_enum_iterator<Iterator2, true> const& rhs
)
@ -352,7 +352,7 @@ namespace sprout {
;
}
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> operator+(
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> operator+(
typename sprout::size_enum_iterator<Iterator, Separated>::difference_type n,
sprout::size_enum_iterator<Iterator, Separated> const& it
)
@ -364,12 +364,12 @@ namespace sprout {
// make_size_enum_iterator
//
template<typename Iterator>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator>
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator>
make_size_enum_iterator(Iterator it) {
return sprout::size_enum_iterator<Iterator>(it);
}
template<typename Iterator>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, true>
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, true>
make_size_enum_iterator(
Iterator it,
typename sprout::size_enum_iterator<Iterator, true>::value_type sep_size,
@ -396,14 +396,14 @@ namespace sprout {
// next
//
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> next(
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> next(
sprout::size_enum_iterator<Iterator, Separated> const& it
)
{
return it.next();
}
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> next(
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> next(
sprout::size_enum_iterator<Iterator, Separated> const& it,
typename sprout::size_enum_iterator<Iterator, Separated>::difference_type n
)
@ -415,14 +415,14 @@ namespace sprout {
// prev
//
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> prev(
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> prev(
sprout::size_enum_iterator<Iterator, Separated> const& it
)
{
return it.prev();
}
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> prev(
inline SPROUT_CONSTEXPR sprout::size_enum_iterator<Iterator, Separated> prev(
sprout::size_enum_iterator<Iterator, Separated> const& it,
typename sprout::size_enum_iterator<Iterator, Separated>::difference_type n
)
@ -434,7 +434,7 @@ namespace sprout {
// distance
//
template<typename Iterator, bool Separated>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::size_enum_iterator<Iterator, Separated> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::size_enum_iterator<Iterator, Separated> >::difference_type
distance(
sprout::size_enum_iterator<Iterator, Separated> first,
sprout::size_enum_iterator<Iterator, Separated> last

View file

@ -156,7 +156,7 @@ namespace sprout {
};
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -164,7 +164,7 @@ namespace sprout {
return lhs.index() == rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -172,7 +172,7 @@ namespace sprout {
return !(lhs == rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -180,7 +180,7 @@ namespace sprout {
return lhs.index() < rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -188,7 +188,7 @@ namespace sprout {
return rhs < lhs;
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -196,7 +196,7 @@ namespace sprout {
return !(rhs < lhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -204,7 +204,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR typename sprout::square_iterator<Value1>::difference_type operator-(
inline SPROUT_CONSTEXPR typename sprout::square_iterator<Value1>::difference_type operator-(
sprout::square_iterator<Value1> const& lhs,
sprout::square_iterator<Value2> const& rhs
)
@ -212,7 +212,7 @@ namespace sprout {
return lhs.index() - rhs.index();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::square_iterator<Value> operator+(
inline SPROUT_CONSTEXPR sprout::square_iterator<Value> operator+(
typename sprout::square_iterator<Value>::difference_type n,
sprout::square_iterator<Value> const& it
)
@ -224,7 +224,7 @@ namespace sprout {
// swap
//
template<typename Value>
void swap(sprout::square_iterator<Value>& lhs, sprout::square_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::square_iterator<Value>& lhs, sprout::square_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -232,14 +232,14 @@ namespace sprout {
// next
//
template<typename Value>
SPROUT_CONSTEXPR sprout::square_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::square_iterator<Value> next(
sprout::square_iterator<Value> const& it
)
{
return it.next();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::square_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::square_iterator<Value> next(
sprout::square_iterator<Value> const& it,
typename sprout::square_iterator<Value>::difference_type n
)
@ -251,14 +251,14 @@ namespace sprout {
// prev
//
template<typename Value>
SPROUT_CONSTEXPR sprout::square_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::square_iterator<Value> prev(
sprout::square_iterator<Value> const& it
)
{
return it.prev();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::square_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::square_iterator<Value> prev(
sprout::square_iterator<Value> const& it,
typename sprout::square_iterator<Value>::difference_type n
)
@ -270,7 +270,7 @@ namespace sprout {
// distance
//
template<typename Value>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::square_iterator<Value> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::square_iterator<Value> >::difference_type
distance(
sprout::square_iterator<Value> first,
sprout::square_iterator<Value> last

View file

@ -277,7 +277,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -288,7 +288,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -299,7 +299,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -310,7 +310,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -321,7 +321,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -332,7 +332,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -343,7 +343,7 @@ namespace sprout {
typename UnaryOrBinaryFunction1, typename LIterator1, typename RIterator1,
typename UnaryOrBinaryFunction2, typename LIterator2, typename RIterator2
>
SPROUT_CONSTEXPR decltype(std::declval<LIterator1>() - std::declval<LIterator2>()) operator-(
inline SPROUT_CONSTEXPR decltype(std::declval<LIterator1>() - std::declval<LIterator2>()) operator-(
sprout::transform_iterator<UnaryOrBinaryFunction1, LIterator1, RIterator1> const& lhs,
sprout::transform_iterator<UnaryOrBinaryFunction2, LIterator2, RIterator2> const& rhs
)
@ -351,7 +351,7 @@ namespace sprout {
return lhs.base() - rhs.base();
}
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> operator+(
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> operator+(
typename sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator>::difference_type n,
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> const& it
)
@ -363,12 +363,12 @@ namespace sprout {
// make_transform_iterator
//
template<typename BinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<BinaryFunction, LIterator, RIterator>
inline SPROUT_CONSTEXPR sprout::transform_iterator<BinaryFunction, LIterator, RIterator>
make_transform_iterator(LIterator it1, RIterator it2, BinaryFunction func) {
return sprout::transform_iterator<BinaryFunction, LIterator, RIterator>(it1, it2, func);
}
template<typename UnaryFunction, typename Iterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryFunction, Iterator>
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryFunction, Iterator>
make_transform_iterator(Iterator it, UnaryFunction func) {
return sprout::transform_iterator<UnaryFunction, Iterator>(it, func);
}
@ -390,14 +390,14 @@ namespace sprout {
// next
//
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> next(
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> next(
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> const& it
)
{
return it.next();
}
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> next(
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> next(
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> const& it,
typename sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator>::difference_type n
)
@ -409,14 +409,14 @@ namespace sprout {
// prev
//
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> prev(
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> prev(
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> const& it
)
{
return it.prev();
}
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> prev(
inline SPROUT_CONSTEXPR sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> prev(
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> const& it,
typename sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator>::difference_type n
)
@ -428,7 +428,7 @@ namespace sprout {
// distance
//
template<typename UnaryOrBinaryFunction, typename LIterator, typename RIterator>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> >::difference_type
distance(
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> first,
sprout::transform_iterator<UnaryOrBinaryFunction, LIterator, RIterator> last

View file

@ -146,7 +146,7 @@ namespace sprout {
};
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator==(
inline SPROUT_CONSTEXPR bool operator==(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -154,7 +154,7 @@ namespace sprout {
return lhs.index() == rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator!=(
inline SPROUT_CONSTEXPR bool operator!=(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -162,7 +162,7 @@ namespace sprout {
return !(lhs == rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<(
inline SPROUT_CONSTEXPR bool operator<(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -170,7 +170,7 @@ namespace sprout {
return lhs.index() < rhs.index();
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>(
inline SPROUT_CONSTEXPR bool operator>(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -178,7 +178,7 @@ namespace sprout {
return rhs < lhs;
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator<=(
inline SPROUT_CONSTEXPR bool operator<=(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -186,7 +186,7 @@ namespace sprout {
return !(rhs < lhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR bool operator>=(
inline SPROUT_CONSTEXPR bool operator>=(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -194,7 +194,7 @@ namespace sprout {
return !(lhs < rhs);
}
template<typename Value1, typename Value2>
SPROUT_CONSTEXPR typename sprout::triangle_iterator<Value1>::difference_type operator-(
inline SPROUT_CONSTEXPR typename sprout::triangle_iterator<Value1>::difference_type operator-(
sprout::triangle_iterator<Value1> const& lhs,
sprout::triangle_iterator<Value2> const& rhs
)
@ -202,7 +202,7 @@ namespace sprout {
return lhs.index() - rhs.index();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::triangle_iterator<Value> operator+(
inline SPROUT_CONSTEXPR sprout::triangle_iterator<Value> operator+(
typename sprout::triangle_iterator<Value>::difference_type n,
sprout::triangle_iterator<Value> const& it
)
@ -214,7 +214,7 @@ namespace sprout {
// swap
//
template<typename Value>
void swap(sprout::triangle_iterator<Value>& lhs, sprout::triangle_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::triangle_iterator<Value>& lhs, sprout::triangle_iterator<Value>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -222,14 +222,14 @@ namespace sprout {
// next
//
template<typename Value>
SPROUT_CONSTEXPR sprout::triangle_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::triangle_iterator<Value> next(
sprout::triangle_iterator<Value> const& it
)
{
return it.next();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::triangle_iterator<Value> next(
inline SPROUT_CONSTEXPR sprout::triangle_iterator<Value> next(
sprout::triangle_iterator<Value> const& it,
typename sprout::triangle_iterator<Value>::difference_type n
)
@ -241,14 +241,14 @@ namespace sprout {
// prev
//
template<typename Value>
SPROUT_CONSTEXPR sprout::triangle_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::triangle_iterator<Value> prev(
sprout::triangle_iterator<Value> const& it
)
{
return it.prev();
}
template<typename Value>
SPROUT_CONSTEXPR sprout::triangle_iterator<Value> prev(
inline SPROUT_CONSTEXPR sprout::triangle_iterator<Value> prev(
sprout::triangle_iterator<Value> const& it,
typename sprout::triangle_iterator<Value>::difference_type n
)
@ -260,7 +260,7 @@ namespace sprout {
// distance
//
template<typename Value>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::triangle_iterator<Value> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::triangle_iterator<Value> >::difference_type
distance(
sprout::triangle_iterator<Value> first,
sprout::triangle_iterator<Value> last

View file

@ -160,7 +160,7 @@ namespace sprout {
// swap
//
template<typename T>
void swap(sprout::value_iterator<T>& lhs, sprout::value_iterator<T>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
inline void swap(sprout::value_iterator<T>& lhs, sprout::value_iterator<T>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))) {
lhs.swap(rhs);
}
@ -168,14 +168,14 @@ namespace sprout {
// next
//
template<typename T>
SPROUT_CONSTEXPR sprout::value_iterator<T> next(
inline SPROUT_CONSTEXPR sprout::value_iterator<T> next(
sprout::value_iterator<T> const& it
)
{
return it.next();
}
template<typename T>
SPROUT_CONSTEXPR sprout::value_iterator<T> next(
inline SPROUT_CONSTEXPR sprout::value_iterator<T> next(
sprout::value_iterator<T> const& it,
typename sprout::value_iterator<T>::difference_type n
)
@ -187,14 +187,14 @@ namespace sprout {
// prev
//
template<typename T>
SPROUT_CONSTEXPR sprout::value_iterator<T> prev(
inline SPROUT_CONSTEXPR sprout::value_iterator<T> prev(
sprout::value_iterator<T> const& it
)
{
return it.prev();
}
template<typename T>
SPROUT_CONSTEXPR sprout::value_iterator<T> prev(
inline SPROUT_CONSTEXPR sprout::value_iterator<T> prev(
sprout::value_iterator<T> const& it,
typename sprout::value_iterator<T>::difference_type n
)
@ -206,7 +206,7 @@ namespace sprout {
// distance
//
template<typename T>
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::value_iterator<T> >::difference_type
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::value_iterator<T> >::difference_type
distance(sprout::value_iterator<T> first, sprout::value_iterator<T> last) {
return last - first;
}

View file

@ -223,7 +223,7 @@ namespace sprout {
// bernoulli_number_limit
//
template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
SPROUT_CONSTEXPR std::size_t bernoulli_number_limit() {
inline SPROUT_CONSTEXPR std::size_t bernoulli_number_limit() {
typedef typename std::remove_cv<T>::type type;
return sprout::math::detail::bernoulli_numbers<type>::limit;
}
@ -231,7 +231,7 @@ namespace sprout {
// bernoulli_number
//
template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
SPROUT_CONSTEXPR T bernoulli_number(std::size_t x) {
inline SPROUT_CONSTEXPR T bernoulli_number(std::size_t x) {
typedef typename std::remove_cv<T>::type type;
return x <= sprout::math::bernoulli_number_limit<type>()
? x == 1 ? type(-1) / 2

View file

@ -757,7 +757,7 @@ namespace sprout {
// factorial_limit
//
template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
SPROUT_CONSTEXPR std::size_t factorial_limit() {
inline SPROUT_CONSTEXPR std::size_t factorial_limit() {
typedef typename std::remove_cv<T>::type type;
return sprout::math::detail::factorials<type>::limit;
}
@ -765,7 +765,7 @@ namespace sprout {
// factorial
//
template<typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
SPROUT_CONSTEXPR T factorial(std::size_t x) {
inline SPROUT_CONSTEXPR T factorial(std::size_t x) {
typedef typename std::remove_cv<T>::type type;
return x <= sprout::math::factorial_limit<type>()
? sprout::math::detail::factorials<type>::table[x]

View file

@ -6,12 +6,7 @@
#include <sprout/numeric/dft/idft.hpp>
#include <sprout/numeric/dft/dft_element.hpp>
#include <sprout/numeric/dft/idft_element.hpp>
#include <sprout/numeric/dft/amplitude_spectrum.hpp>
#include <sprout/numeric/dft/phase_spectrum.hpp>
#include <sprout/numeric/dft/spectrum.hpp>
#include <sprout/numeric/dft/sinusoid.hpp>
#include <sprout/numeric/dft/sawtooth.hpp>
#include <sprout/numeric/dft/triangle.hpp>
#include <sprout/numeric/dft/square.hpp>
#include <sprout/numeric/dft/wave.hpp>
#endif // #ifndef SPROUT_NUMERIC_DFT_HPP

View file

@ -0,0 +1,10 @@
#ifndef SPROUT_NUMERIC_DFT_FIT_WAVE_HPP
#define SPROUT_NUMERIC_DFT_FIT_WAVE_HPP
#include <sprout/config.hpp>
#include <sprout/numeric/dft/fit/sinusoid.hpp>
#include <sprout/numeric/dft/fit/sawtooth.hpp>
#include <sprout/numeric/dft/fit/triangle.hpp>
#include <sprout/numeric/dft/fit/square.hpp>
#endif // #ifndef SPROUT_NUMERIC_DFT_FIT_WAVE_HPP

View file

@ -0,0 +1,10 @@
#ifndef SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP
#define SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP
#include <sprout/config.hpp>
#include <sprout/numeric/dft/fixed/sinusoid.hpp>
#include <sprout/numeric/dft/fixed/sawtooth.hpp>
#include <sprout/numeric/dft/fixed/triangle.hpp>
#include <sprout/numeric/dft/fixed/square.hpp>
#endif // #ifndef SPROUT_NUMERIC_DFT_FIXED_WAVE_HPP

View file

@ -0,0 +1,8 @@
#ifndef SPROUT_NUMERIC_DFT_WAVE_HPP
#define SPROUT_NUMERIC_DFT_WAVE_HPP
#include <sprout/config.hpp>
#include <sprout/numeric/dft/fixed/wave.hpp>
#include <sprout/numeric/dft/fit/wave.hpp>
#endif // #ifndef SPROUT_NUMERIC_DFT_WAVE_HPP

View file

@ -7,6 +7,7 @@
#include <sprout/pit/hash.hpp>
#include <sprout/pit/tuple.hpp>
#include <sprout/pit/container.hpp>
#include <sprout/pit/type_traits.hpp>
#include <sprout/pit/blank.hpp>
#endif // #ifndef SPROUT_PIT_HPP

View file

@ -8,7 +8,7 @@
namespace sprout {
template<typename Container>
SPROUT_CONSTEXPR std::size_t hash_value(sprout::pit<Container> const& v) {
inline SPROUT_CONSTEXPR std::size_t hash_value(sprout::pit<Container> const& v) {
return sprout::to_hash(v.elem);
}
} // namespace sprout

View file

@ -0,0 +1,30 @@
#ifndef SPROUT_PIT_TYPE_TRAITS_HPP
#define SPROUT_PIT_TYPE_TRAITS_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/pit/pit.hpp>
namespace sprout {
//
// is_pit
//
template<typename T>
struct is_pit
: public std::false_type
{};
template<typename T>
struct is_pit<T const>
: public sprout::is_pit<T>
{};
template<typename T>
struct is_pit<T const volatile>
: public sprout::is_pit<T>
{};
template<typename Container>
struct is_pit<sprout::pit<Container> >
: public std::true_type
{};
} // namespace sprout
#endif // #ifndef SPROUT_PIT_TYPE_TRAITS_HPP

View file

@ -8,9 +8,6 @@
#include <sprout/range/adaptor/deep_copied.hpp>
#include <sprout/range/adaptor/sized.hpp>
#include <sprout/range/adaptor/size_enumed.hpp>
#include <sprout/range/adaptor/sinusoidal.hpp>
#include <sprout/range/adaptor/sawtooth_wave.hpp>
#include <sprout/range/adaptor/triangle_wave.hpp>
#include <sprout/range/adaptor/square_wave.hpp>
#include <sprout/range/adaptor/wave.hpp>
#endif // #ifndef SPROUT_RANGE_ADAPTOR_HPP

View file

@ -0,0 +1,10 @@
#ifndef SPROUT_RANGE_ADAPTOR_WAVE_HPP
#define SPROUT_RANGE_ADAPTOR_WAVE_HPP
#include <sprout/config.hpp>
#include <sprout/range/adaptor/sinusoidal.hpp>
#include <sprout/range/adaptor/sawtooth_wave.hpp>
#include <sprout/range/adaptor/triangle_wave.hpp>
#include <sprout/range/adaptor/square_wave.hpp>
#endif // #ifndef SPROUT_RANGE_ADAPTOR_WAVE_HPP

View file

@ -4,8 +4,6 @@
#include <sprout/config.hpp>
#include <sprout/range/numeric/dft/dft.hpp>
#include <sprout/range/numeric/dft/idft.hpp>
#include <sprout/range/numeric/dft/amplitude_spectrum.hpp>
#include <sprout/range/numeric/dft/phase_spectrum.hpp>
#include <sprout/range/numeric/dft/spectrum.hpp>
#endif // #ifndef SPROUT_RANGE_NUMERIC_DFT_HPP

View file

@ -54,7 +54,7 @@ namespace sprout {
// shrink
//
template<typename T, std::size_t N, typename Traits>
SPROUT_CONSTEXPR sprout::shrink_string<T, N, Traits>
inline SPROUT_CONSTEXPR sprout::shrink_string<T, N, Traits>
shrink(sprout::basic_string<T, N, Traits> const& s) {
return sprout::shrink_string<T, N, Traits>(s);
}

View file

@ -501,7 +501,7 @@ namespace sprout {
// get
//
template<std::size_t I, typename T>
SPROUT_CONSTEXPR auto
inline SPROUT_CONSTEXPR auto
get(T&& t) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::get<I>(sprout::forward<T>(t))))
-> decltype(std::get<I>(sprout::forward<T>(t)))
{
@ -512,30 +512,30 @@ namespace sprout {
//
namespace detail {
template<std::size_t I, typename Head, typename... Tail>
SPROUT_CONSTEXPR typename std::add_lvalue_reference<Head>::type
inline SPROUT_CONSTEXPR typename std::add_lvalue_reference<Head>::type
get_helper(sprout::tuples::detail::tuple_impl<I, Head, Tail...>& t) SPROUT_NOEXCEPT {
return sprout::tuples::detail::tuple_impl<I, Head, Tail...>::head(t);
}
template<std::size_t I, typename Head, typename... Tail>
SPROUT_CONSTEXPR typename std::add_lvalue_reference<typename std::add_const<Head>::type>::type
inline SPROUT_CONSTEXPR typename std::add_lvalue_reference<typename std::add_const<Head>::type>::type
get_helper(sprout::tuples::detail::tuple_impl<I, Head, Tail...> const& t) SPROUT_NOEXCEPT {
return sprout::tuples::detail::tuple_impl<I, Head, Tail...>::head(t);
}
} // namespace detail
template<std::size_t I, typename... Types>
SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type&
inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type&
get(sprout::tuples::tuple<Types...>& t) SPROUT_NOEXCEPT {
return sprout::tuples::detail::get_helper<I>(t);
}
template<std::size_t I, typename... Types>
SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type&&
inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type&&
get(sprout::tuples::tuple<Types...>&& t) SPROUT_NOEXCEPT {
return sprout::forward<typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type&&>(
sprout::tuples::get<I>(t)
);
}
template<std::size_t I, typename... Types>
SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type const&
inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<I, sprout::tuples::tuple<Types...> >::type const&
get(sprout::tuples::tuple<Types...> const& t) SPROUT_NOEXCEPT {
return sprout::tuples::detail::get_helper<I>(t);
}

View file

@ -48,7 +48,7 @@ namespace sprout {
typename... Tail,
typename sprout::enabler_if<N == 0>::type = sprout::enabler
>
SPROUT_CONSTEXPR R fppack_at_impl(Head&& head, Tail&&... tail) {
inline SPROUT_CONSTEXPR R fppack_at_impl(Head&& head, Tail&&... tail) {
return sprout::forward<Head>(head);
}
template<
@ -58,12 +58,12 @@ namespace sprout {
typename... Tail,
typename sprout::enabler_if<N != 0>::type = sprout::enabler
>
SPROUT_CONSTEXPR R fppack_at_impl(Head&& head, Tail&&... tail) {
inline SPROUT_CONSTEXPR R fppack_at_impl(Head&& head, Tail&&... tail) {
return sprout::detail::fppack_at_impl<N - 1, R>(sprout::forward<Tail>(tail)...);
}
} // namespace detail
template<std::size_t N, typename... Args>
SPROUT_CONSTEXPR typename sprout::tppack_at<N, Args&&...>::type fppack_at(Args&&... args) {
inline SPROUT_CONSTEXPR typename sprout::tppack_at<N, Args&&...>::type fppack_at(Args&&... args) {
return sprout::detail::fppack_at_impl<
N,
typename sprout::tppack_at<N, Args&&...>::type

View file

@ -7,7 +7,7 @@
#include <sprout/uuid/uuid.hpp>
namespace sprout {
SPROUT_CONSTEXPR std::size_t hash_value(sprout::uuids::uuid const& v) {
inline SPROUT_CONSTEXPR std::size_t hash_value(sprout::uuids::uuid const& v) {
return sprout::hash_range(v.begin(), v.end());
}
} // namespace sprout

View file

@ -11,22 +11,22 @@ namespace sprout {
// get
//
template<typename U, typename... Types>
SPROUT_CONSTEXPR U const& get(sprout::variant<Types...> const& operand) {
inline SPROUT_CONSTEXPR U const& get(sprout::variant<Types...> const& operand) {
return operand.template get<U>();
}
template<typename U, typename... Types>
U& get(sprout::variant<Types...>& operand) {
inline SPROUT_CONSTEXPR U& get(sprout::variant<Types...>& operand) {
return operand.template get<U>();
}
template<std::size_t I, typename... Types>
SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<
inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<
I,
sprout::variant<Types...>
>::type const& get(sprout::variant<Types...> const& operand) {
return operand.template get_at<I>();
}
template<std::size_t I, typename... Types>
typename sprout::tuples::tuple_element<
inline SPROUT_CONSTEXPR typename sprout::tuples::tuple_element<
I,
sprout::variant<Types...>
>::type& get(sprout::variant<Types...>& operand) {

View file

@ -82,7 +82,7 @@ namespace sprout {
# undef SPROUT_WEED_BDIGITS_TABLE_DEF
template<typename IntType>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> bvalue_at(std::size_t i) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> bvalue_at(std::size_t i) {
return i < 2
? sprout::tuples::tuple<IntType, bool>(
static_cast<IntType>(sprout::weed::detail::bvalues<void>::table[i]),
@ -95,7 +95,7 @@ namespace sprout {
;
}
template<typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_bdigit(Elem c) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_bdigit(Elem c) {
return sprout::weed::detail::bvalue_at<IntType>(
NS_SSCRISK_CEL_OR_SPROUT::distance(
sprout::weed::detail::bdigits<Elem>::table.begin(),

View file

@ -82,7 +82,7 @@ namespace sprout {
# undef SPROUT_WEED_DIGITS_TABLE_DEF
template<typename IntType>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> value_at(std::size_t i) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> value_at(std::size_t i) {
return i < 10
? sprout::tuples::tuple<IntType, bool>(
static_cast<IntType>(sprout::weed::detail::values<void>::table[i]),
@ -95,7 +95,7 @@ namespace sprout {
;
}
template<typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_digit(Elem c) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_digit(Elem c) {
return sprout::weed::detail::value_at<IntType>(
NS_SSCRISK_CEL_OR_SPROUT::distance(
sprout::weed::detail::digits<Elem>::table.begin(),

View file

@ -14,7 +14,7 @@ namespace sprout {
namespace weed {
namespace detail {
template<std::size_t Radix, typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
Elem c,
typename std::enable_if<Radix == 10>::type* = 0
)
@ -22,7 +22,7 @@ namespace sprout {
return sprout::weed::detail::from_digit<IntType>(c);
}
template<std::size_t Radix, typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
Elem c,
typename std::enable_if<Radix == 2>::type* = 0
)
@ -30,7 +30,7 @@ namespace sprout {
return sprout::weed::detail::from_bdigit<IntType>(c);
}
template<std::size_t Radix, typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
Elem c,
typename std::enable_if<Radix == 8>::type* = 0
)
@ -38,7 +38,7 @@ namespace sprout {
return sprout::weed::detail::from_odigit<IntType>(c);
}
template<std::size_t Radix, typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
Elem c,
typename std::enable_if<Radix == 16>::type* = 0
)

View file

@ -82,7 +82,7 @@ namespace sprout {
# undef SPROUT_WEED_ODIGITS_TABLE_DEF
template<typename IntType>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> ovalue_at(std::size_t i) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> ovalue_at(std::size_t i) {
return i < 8
? sprout::tuples::tuple<IntType, bool>(
static_cast<IntType>(sprout::weed::detail::ovalues<void>::table[i]),
@ -95,7 +95,7 @@ namespace sprout {
;
}
template<typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_odigit(Elem c) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_odigit(Elem c) {
return sprout::weed::detail::ovalue_at<IntType>(
NS_SSCRISK_CEL_OR_SPROUT::distance(
sprout::weed::detail::odigits<Elem>::table.begin(),

View file

@ -82,7 +82,7 @@ namespace sprout {
# undef SPROUT_WEED_XDIGITS_TABLE_DEF
template<typename IntType>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> xvalue_at(std::size_t i) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> xvalue_at(std::size_t i) {
return i < 22
? sprout::tuples::tuple<IntType, bool>(
static_cast<IntType>(sprout::weed::detail::xvalues<void>::table[i]),
@ -95,7 +95,7 @@ namespace sprout {
;
}
template<typename IntType, typename Elem>
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_xdigit(Elem c) {
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_xdigit(Elem c) {
return sprout::weed::detail::xvalue_at<IntType>(
NS_SSCRISK_CEL_OR_SPROUT::distance(
sprout::weed::detail::xdigits<Elem>::table.begin(),