fix config macro name

This commit is contained in:
bolero-MURAKAMI 2013-01-13 17:41:45 +09:00
parent d1379ff155
commit 1ed18456b3
13 changed files with 64 additions and 20 deletions

View file

@ -47,6 +47,7 @@
# include <sprout/config/compiler/visualc.hpp>
#endif
#include <sprout/config/compiler/cxx11.hpp>
#include <sprout/config/compiler/no_cxx11_future.hpp>
#include <sprout/config/compiler/has_future.hpp>
#endif // #ifndef SPROUT_CONFIG_COMPILER_HPP

View file

@ -0,0 +1,29 @@
#ifndef SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP
#define SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP
#ifndef SPROUT_NO_CONSTEXPR
# define SPROUT_HAS_CONSTEXPR
#endif
#ifndef SPROUT_NO_DEFAULTED_FUNCTIONS
# define SPROUT_HAS_DEFAULTED_FUNCTIONS
#endif
#ifndef SPROUT_NO_DELETED_FUNCTIONS
# define SPROUT_HAS_DELETED_FUNCTIONS
#endif
#ifndef SPROUT_NO_NOEXCEPT
# define SPROUT_HAS_NOEXCEPT
#endif
#ifndef SPROUT_NO_TEMPLATE_ALIASES
# define SPROUT_HAS_TEMPLATE_ALIASES
#endif
#ifndef SPROUT_NO_USER_DEFINED_LITERALS
# define SPROUT_HAS_USER_DEFINED_LITERALS
#endif
#ifndef SPROUT_NO_DELEGATING_CONSTRUCTORS
# define SPROUT_HAS_DELEGATING_CONSTRUCTORS
#endif
#ifndef SPROUT_NO_UNICODE_LITERALS
# define SPROUT_HAS_UNICODE_LITERALS
#endif
#endif // #ifndef SPROUT_CONFIG_COMPILER_HAS_FUTURE_HPP

View file

@ -1,5 +1,5 @@
#ifndef SPROUT_CONFIG_COMPILER_CXX11_HPP
#define SPROUT_CONFIG_COMPILER_CXX11_HPP
#ifndef SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP
#define SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP
#ifdef SPROUT_NO_CONSTEXPR
# define SPROUT_NO_CXX11_CONSTEXPR
@ -11,19 +11,19 @@
# define SPROUT_NO_CXX11_DELETED_FUNCTIONS
#endif
#ifdef SPROUT_NO_NOEXCEPT
# define SPROUT_NO_CXX11_CNOEXCEPT
# define SPROUT_NO_CXX11_NOEXCEPT
#endif
#ifdef SPROUT_NO_TEMPLATE_ALIASES
# define SPROUT_NO_CXX11_CTEMPLATE_ALIASES
# define SPROUT_NO_CXX11_TEMPLATE_ALIASES
#endif
#ifdef SPROUT_NO_USER_DEFINED_LITERALS
# define SPROUT_NO_CXX11_CUSER_DEFINED_LITERALS
# define SPROUT_NO_CXX11_USER_DEFINED_LITERALS
#endif
#ifdef SPROUT_NO_DELEGATING_CONSTRUCTORS
# define SPROUT_NO_CXX11_CDELEGATING_CONSTRUCTORS
# define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS
#endif
#ifdef SPROUT_NO_UNICODE_LITERALS
# define SPROUT_NO_CXX11_UNICODE_LITERALS
#endif
#endif // #ifndef SPROUT_CONFIG_COMPILER_CXX11_HPP
#endif // #ifndef SPROUT_CONFIG_COMPILER_NO_CXX11_FUTURE_HPP

View file

@ -85,11 +85,11 @@
# define SPROUT_USE_BUILTIN_BIT_OPERATION 0
#endif // #ifndef SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION
#ifndef SPROUT_CONFIG_DISABLE_THROW_INT_CONVERSION_OVERFLOW
# define SPROUT_NOTHROW_INT_CONVERSION_OVERFLOW 1
#else // #ifndef SPROUT_CONFIG_DISABLE_THROW_INT_CONVERSION_OVERFLOW
# define SPROUT_NOTHROW_INT_CONVERSION_OVERFLOW 0
#endif // #ifndef SPROUT_CONFIG_DISABLE_THROW_INT_CONVERSION_OVERFLOW
#ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING
# define SPROUT_NOERROR_LARGE_FLOAT_ROUNDING 1
#else // #ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING
# define SPROUT_NOERROR_LARGE_FLOAT_ROUNDING 0
#endif // #ifndef SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING
#ifndef SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION
# define SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION 1

View file

@ -23,6 +23,10 @@ namespace sprout {
} // namespace detail
// 7.21.5.1 memchr ŠÖ<C5A0>
//
// recursion depth:
// O(log N)
//
inline SPROUT_CONSTEXPR void const*
memchr(void const* s, int c, std::size_t n) {
return sprout::detail::memchr_impl(

View file

@ -8,6 +8,10 @@
namespace sprout {
// 7.21.4.1 memcmp ŠÖ<C5A0>
//
// recursion depth:
// O(log(N1+N2))
//
inline SPROUT_CONSTEXPR int
memcmp(void const* s1, void const* s2, std::size_t n) {
return sprout::tristate_lexicographical_compare(

View file

@ -25,6 +25,9 @@ namespace sprout {
//
// wmemchr
//
// recursion depth:
// O(log N)
//
inline SPROUT_CONSTEXPR wchar_t const*
wmemchr(wchar_t const* s, wchar_t c, size_t n) {
return sprout::detail::wmemchr_impl(

View file

@ -10,6 +10,9 @@ namespace sprout {
//
// wmemcmp
//
// recursion depth:
// O(log(N1+N2))
//
inline SPROUT_CONSTEXPR int
wmemcmp(wchar_t const* s1, wchar_t const* s2, std::size_t n) {
return sprout::tristate_lexicographical_compare(

View file

@ -29,7 +29,7 @@ namespace sprout {
ceil(FloatType x) {
return sprout::math::isinf(x) ? x
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("ceil: Sorry, not implemented."), x)
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("ceil: large float rounding."), x)
: x < 0 ? -static_cast<FloatType>(static_cast<std::uintmax_t>(-x))
: sprout::math::detail::ceil_impl(x, static_cast<FloatType>(static_cast<std::uintmax_t>(x)))
;

View file

@ -12,10 +12,10 @@
# define NS_SPROUT_MATH_DETAIL sprout::math::detail
#endif // #ifndef SPROUT_USE_BUILTIN_CMATH_FUNCTION
#if SPROUT_NOTHROW_INT_CONVERSION_OVERFLOW
# define SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(e, x) (x)
#if SPROUT_NOERROR_LARGE_FLOAT_ROUNDING
# define SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(e, x) (x)
#else
# define SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(e, x) throw (e)
# define SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(e, x) throw (e)
#endif
#endif // #ifndef SPROUT_MATH_DETAIL_CONFIG_HPP

View file

@ -29,7 +29,7 @@ namespace sprout {
floor(FloatType x) {
return sprout::math::isinf(x) ? x
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("floor: Sorry, not implemented."), x)
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("floor: large float rounding."), x)
: x < 0 ? sprout::math::detail::floor_impl(x, -static_cast<FloatType>(static_cast<std::uintmax_t>(-x)))
: static_cast<FloatType>(static_cast<std::uintmax_t>(x))
;

View file

@ -35,7 +35,7 @@ namespace sprout {
round(FloatType x) {
return sprout::math::isinf(x) ? x
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("round: Sorry, not implemented."), x)
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("round: large float rounding."), x)
: x < 0 ? sprout::math::detail::round_impl_nagative(x, -static_cast<FloatType>(static_cast<std::uintmax_t>(-x)))
: sprout::math::detail::round_impl_positive(x, static_cast<FloatType>(static_cast<std::uintmax_t>(x)))
;

View file

@ -21,7 +21,7 @@ namespace sprout {
trunc(FloatType x) {
return sprout::math::isinf(x) ? x
: std::numeric_limits<std::uintmax_t>::max() < x || std::numeric_limits<std::uintmax_t>::max() < -x
? SPROUT_MATH_DETAIL_INT_CONVERSION_OVERFLOW(std::domain_error("trunc: Sorry, not implemented."), x)
? SPROUT_MATH_THROW_LARGE_FLOAT_ROUNDING(std::domain_error("trunc: large float rounding."), x)
: x < 0 ? -static_cast<FloatType>(static_cast<std::uintmax_t>(-x))
: static_cast<FloatType>(static_cast<std::uintmax_t>(x))
;