fix type_traits/aliases.hpp

This commit is contained in:
bolero-MURAKAMI 2012-05-27 00:43:38 +09:00
parent eaea3771fc
commit 5c9e1cb991
56 changed files with 130 additions and 55 deletions

View file

@ -8,7 +8,7 @@
#include <sprout/index_tuple.hpp>
#include <sprout/pit.hpp>
#include <sprout/iterator/traits.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/range/adaptor/size_enumed.hpp>
#include <sprout/range/algorithm/lower_bound.hpp>
#include <sprout/range/numeric/partial_sum.hpp>

View file

@ -4,7 +4,7 @@
#include <cstdint>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
SPROUT_CONSTEXPR std::intmax_t imaxabs(std::intmax_t j) {

View file

@ -7,7 +7,7 @@
#include <cinttypes>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
// Copyright (C) 2011 RiSK (sscrisk)

View file

@ -7,7 +7,7 @@
#include <sprout/config.hpp>
#include <sprout/iterator/operation.hpp>
#include <sprout/ctype/ascii.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -5,7 +5,7 @@
#include <cstdlib>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
// Copyright (C) 2011 RiSK (sscrisk)

View file

@ -8,7 +8,7 @@
#include <sprout/config.hpp>
#include <sprout/iterator/operation.hpp>
#include <sprout/ctype/ascii.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -9,7 +9,7 @@
#include <sprout/config.hpp>
#include <sprout/iterator/operation.hpp>
#include <sprout/ctype/ascii.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/detail/char_conversion.hpp>
namespace sprout {

View file

@ -4,7 +4,7 @@
#include <cmath>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -11,7 +11,7 @@
#include <sprout/string.hpp>
#include <sprout/pit.hpp>
#include <sprout/utility/value_holder.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/range/algorithm/lower_bound.hpp>
#include <sprout/range/numeric/partial_sum.hpp>
#include <sprout/type_traits/is_char_type.hpp>

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/asin.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -6,7 +6,7 @@
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/math/sqrt.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -8,7 +8,7 @@
#include <sprout/math/constants.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/math/sqrt.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -6,7 +6,7 @@
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/math/sqrt.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -6,7 +6,7 @@
#include <sprout/config.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -6,7 +6,7 @@
#include <sprout/math/atan.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/pow.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -6,7 +6,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/exp.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace math {

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/exp.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/exp.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <cmath>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/math/isnan.hpp>
#include <sprout/math/isinf.hpp>
#include <sprout/math/iszero.hpp>

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/math/sqrt.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/math/isnan.hpp>
#include <sprout/math/isinf.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION

View file

@ -4,7 +4,7 @@
#include <limits>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/math/isnan.hpp>
#include <sprout/math/isinf.hpp>
#include <sprout/math/issubnormal.hpp>

View file

@ -4,7 +4,7 @@
#include <limits>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/math/iszero.hpp>
namespace sprout {

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace math {

View file

@ -8,7 +8,7 @@
#include <sprout/math/constants.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/math/sqrt.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/log.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -7,7 +7,7 @@
#include <sprout/math/log.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/math/float_promote.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -3,7 +3,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/cos.hpp>
#include <sprout/math/constants.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/math/factorial.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -4,7 +4,7 @@
#include <limits>
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/sin.hpp>
#include <sprout/math/cos.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -5,7 +5,7 @@
#include <sprout/config.hpp>
#include <sprout/math/sinh.hpp>
#include <sprout/math/cosh.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <cmath>
#endif

View file

@ -7,7 +7,7 @@
#include <sprout/config.hpp>
#include <sprout/index_tuple.hpp>
#include <sprout/string/string.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/detail/char_conversion.hpp>
#include <sprout/detail/int.hpp>
#include <sprout/detail/float.hpp>

View file

@ -7,7 +7,7 @@
#include <sprout/index_tuple.hpp>
#include <sprout/string/string.hpp>
#include <sprout/integer/integer_digits.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/detail/char_conversion.hpp>
#include <sprout/detail/int.hpp>

View file

@ -7,7 +7,7 @@
#include <sprout/config.hpp>
#include <sprout/string/string.hpp>
#include <sprout/cstdlib/str_to_float.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -8,7 +8,7 @@
#include <sprout/config.hpp>
#include <sprout/string/string.hpp>
#include <sprout/cstdlib/str_to_int.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
namespace detail {

View file

@ -85,6 +85,81 @@ namespace sprout {
using underlying_type_ = typename std::underlying_type<T>::type;
template<typename F, typename... ArgTypes>
using result_of_ = typename std::result_of<F(ArgTypes...)>::type;
//
// Const-volatility specifiers
//
template<typename T>
using remove_const = sprout::remove_const_<T>;
template<typename T>
using remove_volatile = sprout::remove_volatile_<T>;
template<typename T>
using remove_cv = sprout::remove_cv_<T>;
template<typename T>
using add_const = sprout::add_const_<T>;
template<typename T>
using add_volatile = sprout::add_volatile_<T>;
template<typename T>
using add_cv = sprout::add_cv_<T>;
//
// References
//
template<typename T>
using remove_reference = sprout::remove_reference_<T>;
template<typename T>
using add_lvalue_reference = sprout::add_lvalue_reference_<T>;
template<typename T>
using add_rvalue_reference = sprout::add_rvalue_reference_<T>;
//
// Pointers
//
template<typename T>
using remove_pointer = sprout::remove_pointer_<T>;
template<typename T>
using add_pointer = sprout::add_pointer_<T>;
//
// Sign modifiers
//
template<typename T>
using make_signed = sprout::make_signed_<T>;
template<typename T>
using make_unsigned = sprout::make_unsigned_<T>;
//
// Arrays
//
template<typename T>
using remove_extent = sprout::remove_extent_<T>;
template<typename T>
using remove_all_extents = sprout::remove_all_extents_<T>;
//
// Miscellaneous transformations
//
template<
std::size_t Len,
std::size_t Align = std::alignment_of<typename std::aligned_storage<Len>::type>::value
>
using aligned_storage = sprout::aligned_storage_<Len, Align>;
// !!!
//template<std::size_t Len, typename... Types>
//using aligned_union = sprout::aligned_union_<Len, Types...>;
template<typename T>
using decay = sprout::decay_<T>;
template<bool B, typename T = void>
using enable_if = sprout::enable_if_<B, T>;
template<bool B, typename T, typename F>
using conditional = sprout::conditional_<B, T, F>;
template<typename... Types>
using common_type = sprout::common_type_<Types...>;
template<typename T>
using underlying_type = sprout::underlying_type_<T>;
template<typename F, typename... ArgTypes>
using result_of = sprout::result_of_<F, ArgTypes...>;
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
} // namespace sprout

View file

@ -5,7 +5,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/utility/enabler_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
//