mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix code format
This commit is contained in:
parent
aa8e265188
commit
a0060119ab
31 changed files with 379 additions and 379 deletions
|
@ -148,7 +148,7 @@ namespace sprout {
|
||||||
first1, last1, first2, pred,
|
first1, last1, first2, pred,
|
||||||
sprout::distance(first1, last1) / 2
|
sprout::distance(first1, last1) / 2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace sprout {
|
||||||
typename sprout::container_traits<Container>::difference_type start,
|
typename sprout::container_traits<Container>::difference_type start,
|
||||||
typename sprout::container_traits<Container>::difference_type end
|
typename sprout::container_traits<Container>::difference_type end
|
||||||
)
|
)
|
||||||
{ // select pivot (center)
|
{ // select pivot (center)
|
||||||
return *sprout::next(origin, (end + start) / 2);
|
return *sprout::next(origin, (end + start) / 2);
|
||||||
}
|
}
|
||||||
template<typename Container, typename RandomAccessIterator, typename Compare>
|
template<typename Container, typename RandomAccessIterator, typename Compare>
|
||||||
|
|
|
@ -65,11 +65,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP
|
#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP
|
||||||
|
|
|
@ -30,10 +30,10 @@
|
||||||
#define SPROUT_NO_CXX11_ATTRIBUTES
|
#define SPROUT_NO_CXX11_ATTRIBUTES
|
||||||
|
|
||||||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP
|
#endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#define SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP
|
#define SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP
|
||||||
|
|
||||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
|
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
|
||||||
# define SPROUT_LIBSTDCXX11
|
# define SPROUT_LIBSTDCXX11
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(SPROUT_LIBSTDCXX11)
|
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(SPROUT_LIBSTDCXX11)
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
|
#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
|
||||||
# define SPROUT_NO_CXX11_HDR_ATOMIC
|
# define SPROUT_NO_CXX11_HDR_ATOMIC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 1) || !defined(SPROUT_LIBSTDCXX11)
|
#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 1) || !defined(SPROUT_LIBSTDCXX11)
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
||||||
//
|
//
|
||||||
struct not_one_type {
|
struct not_one_type {
|
||||||
public:
|
public:
|
||||||
char padding[8];
|
char padding[8];
|
||||||
};
|
};
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <sprout/config.hpp>
|
#include <sprout/config.hpp>
|
||||||
#if SPROUT_USE_VARIABLE_TEMPLATES
|
#if SPROUT_USE_VARIABLE_TEMPLATES
|
||||||
# include <sprout/math/constants.hpp>
|
# include <sprout/math/constants.hpp>
|
||||||
#endif // #if SPROUT_USE_VARIABLE_TEMPLATES
|
#endif // #if SPROUT_USE_VARIABLE_TEMPLATES
|
||||||
|
|
||||||
namespace sprout {
|
namespace sprout {
|
||||||
namespace math {
|
namespace math {
|
||||||
|
|
|
@ -369,7 +369,7 @@ namespace sprout {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_NON_CONSTEXPR T*
|
inline SPROUT_NON_CONSTEXPR T*
|
||||||
get_pointer(sprout::exempt_ptr<T> const& p) SPROUT_NOEXCEPT {
|
get_pointer(sprout::exempt_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||||
return p.get();
|
return p.get();
|
||||||
}
|
}
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
||||||
|
|
|
@ -18,26 +18,26 @@ namespace sprout {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_CONSTEXPR T*
|
inline SPROUT_CONSTEXPR T*
|
||||||
get_pointer(T* p) SPROUT_NOEXCEPT {
|
get_pointer(T* p) SPROUT_NOEXCEPT {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_NON_CONSTEXPR T*
|
inline SPROUT_NON_CONSTEXPR T*
|
||||||
get_pointer(std::auto_ptr<T> const& p) SPROUT_NOEXCEPT {
|
get_pointer(std::auto_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||||
return p.get();
|
return p.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(SPROUT_NO_CXX11_SMART_PTR)
|
#if !defined(SPROUT_NO_CXX11_SMART_PTR)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_NON_CONSTEXPR T*
|
inline SPROUT_NON_CONSTEXPR T*
|
||||||
get_pointer(std::unique_ptr<T> const& p) SPROUT_NOEXCEPT {
|
get_pointer(std::unique_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||||
return p.get();
|
return p.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_NON_CONSTEXPR T*
|
inline SPROUT_NON_CONSTEXPR T*
|
||||||
get_pointer(std::shared_ptr<T> const& p) SPROUT_NOEXCEPT {
|
get_pointer(std::shared_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||||
return p.get();
|
return p.get();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
|
@ -130,7 +130,7 @@ namespace sprout {
|
||||||
reverse_words(T val) {
|
reverse_words(T val) {
|
||||||
return sprout::net::detail::reverse_words_impl(val, sizeof(T));
|
return sprout::net::detail::reverse_words_impl(val, sizeof(T));
|
||||||
}
|
}
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf
|
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf
|
||||||
// template<>
|
// template<>
|
||||||
|
@ -193,7 +193,7 @@ namespace sprout {
|
||||||
ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) {
|
ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) {
|
||||||
return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16);
|
return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16);
|
||||||
}
|
}
|
||||||
} //namespace net
|
} //namespace net
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_NET_ENDIAN_HPP
|
#endif // #ifndef SPROUT_NET_ENDIAN_HPP
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#else
|
#else
|
||||||
# include <sprout/predef/hardware/simd/x86.h>
|
# include <sprout/predef/hardware/simd/x86.h>
|
||||||
# if SPROUT_HW_SIMD_X86 > SPROUT_HW_SIMD_X86_AMD
|
# if SPROUT_HW_SIMD_X86 > SPROUT_HW_SIMD_X86_AMD
|
||||||
# undef SPROUT_HW_SIMD_X86_AMD
|
# undef SPROUT_HW_SIMD_X86_AMD
|
||||||
# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86
|
# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86
|
||||||
# endif
|
# endif
|
||||||
# define SPROUT_HW_SIMD_X86_AMD_AVAILABLE
|
# define SPROUT_HW_SIMD_X86_AMD_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
#define SPROUT_LANG_OBJC 0
|
#define SPROUT_LANG_OBJC 0
|
||||||
|
|
||||||
#if defined(__OBJC__)
|
#if defined(__OBJC__)
|
||||||
# undef SPROUT_LANG_OBJC
|
# undef SPROUT_LANG_OBJC
|
||||||
# define SPROUT_LANG_OBJC 1
|
# define SPROUT_LANG_OBJC 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPROUT_LANG_OBJC
|
#if SPROUT_LANG_OBJC
|
||||||
# define SPROUT_LANG_OBJC_AVAILABLE
|
# define SPROUT_LANG_OBJC_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPROUT_LANG_OBJC_NAME "Objective-C"
|
#define SPROUT_LANG_OBJC_NAME "Objective-C"
|
||||||
|
|
|
@ -14,20 +14,20 @@
|
||||||
#define SPROUT_LANG_STDC 0
|
#define SPROUT_LANG_STDC 0
|
||||||
|
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
# undef SPROUT_LANG_STDC
|
# undef SPROUT_LANG_STDC
|
||||||
# if defined(__STDC_VERSION__)
|
# if defined(__STDC_VERSION__)
|
||||||
# if (__STDC_VERSION__ > 100)
|
# if (__STDC_VERSION__ > 100)
|
||||||
# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
|
# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
|
||||||
# else
|
# else
|
||||||
# define SPROUT_LANG_STDC 1
|
# define SPROUT_LANG_STDC 1
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define SPROUT_LANG_STDC 1
|
# define SPROUT_LANG_STDC 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPROUT_LANG_STDC
|
#if SPROUT_LANG_STDC
|
||||||
# define SPROUT_LANG_STDC_AVAILABLE
|
# define SPROUT_LANG_STDC_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPROUT_LANG_STDC_NAME "Standard C"
|
#define SPROUT_LANG_STDC_NAME "Standard C"
|
||||||
|
|
|
@ -14,16 +14,16 @@
|
||||||
#define SPROUT_LANG_STDCPP 0
|
#define SPROUT_LANG_STDCPP 0
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
# undef SPROUT_LANG_STDCPP
|
# undef SPROUT_LANG_STDCPP
|
||||||
# if (__cplusplus > 100)
|
# if (__cplusplus > 100)
|
||||||
# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus)
|
# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus)
|
||||||
# else
|
# else
|
||||||
# define SPROUT_LANG_STDCPP 1
|
# define SPROUT_LANG_STDCPP 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPROUT_LANG_STDCPP
|
#if SPROUT_LANG_STDCPP
|
||||||
# define SPROUT_LANG_STDCPP_AVAILABLE
|
# define SPROUT_LANG_STDCPP_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPROUT_LANG_STDCPP_NAME "Standard C++"
|
#define SPROUT_LANG_STDCPP_NAME "Standard C++"
|
||||||
|
@ -31,16 +31,16 @@
|
||||||
#define SPROUT_LANG_STDCPPCLI 0
|
#define SPROUT_LANG_STDCPPCLI 0
|
||||||
|
|
||||||
#if defined(__cplusplus_cli)
|
#if defined(__cplusplus_cli)
|
||||||
# undef SPROUT_LANG_STDCPPCLI
|
# undef SPROUT_LANG_STDCPPCLI
|
||||||
# if (__cplusplus_cli > 100)
|
# if (__cplusplus_cli > 100)
|
||||||
# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
|
# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
|
||||||
# else
|
# else
|
||||||
# define SPROUT_LANG_STDCPPCLI 1
|
# define SPROUT_LANG_STDCPPCLI 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPROUT_LANG_STDCPPCLI
|
#if SPROUT_LANG_STDCPPCLI
|
||||||
# define SPROUT_LANG_STDCPPCLI_AVAILABLE
|
# define SPROUT_LANG_STDCPPCLI_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPROUT_LANG_STDCPPCLI_NAME "Standard C++/CLI"
|
#define SPROUT_LANG_STDCPPCLI_NAME "Standard C++/CLI"
|
||||||
|
@ -48,12 +48,12 @@
|
||||||
#define SPROUT_LANG_STDECPP 0
|
#define SPROUT_LANG_STDECPP 0
|
||||||
|
|
||||||
#if defined(__embedded_cplusplus)
|
#if defined(__embedded_cplusplus)
|
||||||
# undef SPROUT_LANG_STDECPP
|
# undef SPROUT_LANG_STDECPP
|
||||||
# define SPROUT_LANG_STDECPP 1
|
# define SPROUT_LANG_STDECPP 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPROUT_LANG_STDECPP
|
#if SPROUT_LANG_STDECPP
|
||||||
# define SPROUT_LANG_STDECPP_AVAILABLE
|
# define SPROUT_LANG_STDECPP_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPROUT_LANG_STDECPP_NAME "Standard Embedded C++"
|
#define SPROUT_LANG_STDECPP_NAME "Standard Embedded C++"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// SPROUT_VERSION_NUMBER
|
// SPROUT_VERSION_NUMBER
|
||||||
//
|
//
|
||||||
#define SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH) \
|
#define SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH) \
|
||||||
( (((MAJOR) % 100) * 10000000) + (((MINOR) % 100) * 100000) + ((PATCH) % 100000) )
|
( (((MAJOR) % 100) * 10000000) + (((MINOR) % 100) * 100000) + ((PATCH) % 100000) )
|
||||||
|
|
||||||
//
|
//
|
||||||
// SPROUT_VERSION_NUMBER_MAX
|
// SPROUT_VERSION_NUMBER_MAX
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
// SPROUT_VERSION_NUMBER_ZERO
|
// SPROUT_VERSION_NUMBER_ZERO
|
||||||
//
|
//
|
||||||
#define SPROUT_VERSION_NUMBER_MAX \
|
#define SPROUT_VERSION_NUMBER_MAX \
|
||||||
SPROUT_VERSION_NUMBER(99, 99, 99999)
|
SPROUT_VERSION_NUMBER(99, 99, 99999)
|
||||||
#define SPROUT_VERSION_NUMBER_MIN \
|
#define SPROUT_VERSION_NUMBER_MIN \
|
||||||
SPROUT_VERSION_NUMBER(0, 0, 1)
|
SPROUT_VERSION_NUMBER(0, 0, 1)
|
||||||
#define SPROUT_VERSION_NUMBER_ZERO \
|
#define SPROUT_VERSION_NUMBER_ZERO \
|
||||||
SPROUT_VERSION_NUMBER(0, 0, 0)
|
SPROUT_VERSION_NUMBER(0, 0, 0)
|
||||||
|
|
||||||
//
|
//
|
||||||
// SPROUT_VERSION_NUMBER_AVAILABLE
|
// SPROUT_VERSION_NUMBER_AVAILABLE
|
||||||
// SPROUT_VERSION_NUMBER_NOT_AVAILABLE
|
// SPROUT_VERSION_NUMBER_NOT_AVAILABLE
|
||||||
//
|
//
|
||||||
#define SPROUT_VERSION_NUMBER_AVAILABLE \
|
#define SPROUT_VERSION_NUMBER_AVAILABLE \
|
||||||
SPROUT_VERSION_NUMBER_MIN
|
SPROUT_VERSION_NUMBER_MIN
|
||||||
#define SPROUT_VERSION_NUMBER_NOT_AVAILABLE \
|
#define SPROUT_VERSION_NUMBER_NOT_AVAILABLE \
|
||||||
SPROUT_VERSION_NUMBER_ZERO
|
SPROUT_VERSION_NUMBER_ZERO
|
||||||
|
|
||||||
#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP
|
#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace sprout {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline SPROUT_CONSTEXPR T
|
inline SPROUT_CONSTEXPR T
|
||||||
implicit_cast(typename sprout::identity<T>::type t) {
|
implicit_cast(typename sprout::identity<T>::type t) {
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <sprout/detail/predef.hpp>
|
#include <sprout/detail/predef.hpp>
|
||||||
|
|
||||||
#if defined(__clang__) && defined(__GLIBCXX__)
|
#if defined(__clang__) && defined(__GLIBCXX__)
|
||||||
# if SPROUT_CLANG_EARLIER(3, 4, 2) && (__GLIBCXX__ >= 20140422)
|
# if SPROUT_CLANG_EARLIER(3, 4, 2) && (__GLIBCXX__ >= 20140422)
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
#
|
#
|
||||||
# if defined(__STDDEF_H)
|
# if defined(__STDDEF_H)
|
||||||
|
@ -21,7 +21,7 @@ struct max_align_t {
|
||||||
long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
|
long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue