mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-25 21:35:41 +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,
|
||||
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 end
|
||||
)
|
||||
{ // select pivot (center)
|
||||
{ // select pivot (center)
|
||||
return *sprout::next(origin, (end + start) / 2);
|
||||
}
|
||||
template<typename Container, typename RandomAccessIterator, typename Compare>
|
||||
|
|
|
@ -65,11 +65,11 @@
|
|||
#endif
|
||||
|
||||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
#define SPROUT_NO_CXX11_ATTRIBUTES
|
||||
|
||||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||
# define SPROUT_NO_CXX14_CONSTEXPR
|
||||
#endif
|
||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||
# define SPROUT_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_CONFIG_COMPILER_VISUALC_HPP
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP
|
||||
|
||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
|
||||
# define SPROUT_LIBSTDCXX11
|
||||
# define SPROUT_LIBSTDCXX11
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(SPROUT_LIBSTDCXX11)
|
||||
|
@ -73,7 +73,7 @@
|
|||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 1) || !defined(SPROUT_LIBSTDCXX11)
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
//
|
||||
struct not_one_type {
|
||||
public:
|
||||
char padding[8];
|
||||
char padding[8];
|
||||
};
|
||||
} // namespace detail
|
||||
} // namespace sprout
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <sprout/config.hpp>
|
||||
#if SPROUT_USE_VARIABLE_TEMPLATES
|
||||
# include <sprout/math/constants.hpp>
|
||||
#endif // #if SPROUT_USE_VARIABLE_TEMPLATES
|
||||
#endif // #if SPROUT_USE_VARIABLE_TEMPLATES
|
||||
|
||||
namespace sprout {
|
||||
namespace math {
|
||||
|
|
|
@ -369,7 +369,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_NON_CONSTEXPR T*
|
||||
get_pointer(sprout::exempt_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||
return p.get();
|
||||
return p.get();
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -18,26 +18,26 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T*
|
||||
get_pointer(T* p) SPROUT_NOEXCEPT {
|
||||
return p;
|
||||
return p;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_NON_CONSTEXPR T*
|
||||
get_pointer(std::auto_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||
return p.get();
|
||||
return p.get();
|
||||
}
|
||||
|
||||
#if !defined(SPROUT_NO_CXX11_SMART_PTR)
|
||||
template<typename T>
|
||||
inline SPROUT_NON_CONSTEXPR T*
|
||||
get_pointer(std::unique_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||
return p.get();
|
||||
return p.get();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline SPROUT_NON_CONSTEXPR T*
|
||||
get_pointer(std::shared_ptr<T> const& p) SPROUT_NOEXCEPT {
|
||||
return p.get();
|
||||
return p.get();
|
||||
}
|
||||
#endif
|
||||
} // namespace sprout
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace sprout {
|
|||
reverse_words(T val) {
|
||||
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
|
||||
// template<>
|
||||
|
@ -193,7 +193,7 @@ namespace sprout {
|
|||
ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) {
|
||||
return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16);
|
||||
}
|
||||
} //namespace net
|
||||
} //namespace net
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_NET_ENDIAN_HPP
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
#else
|
||||
# include <sprout/predef/hardware/simd/x86.h>
|
||||
# if SPROUT_HW_SIMD_X86 > SPROUT_HW_SIMD_X86_AMD
|
||||
# undef SPROUT_HW_SIMD_X86_AMD
|
||||
# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86
|
||||
# undef SPROUT_HW_SIMD_X86_AMD
|
||||
# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86
|
||||
# endif
|
||||
# define SPROUT_HW_SIMD_X86_AMD_AVAILABLE
|
||||
#endif
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
#define SPROUT_LANG_OBJC 0
|
||||
|
||||
#if defined(__OBJC__)
|
||||
# undef SPROUT_LANG_OBJC
|
||||
# define SPROUT_LANG_OBJC 1
|
||||
# undef SPROUT_LANG_OBJC
|
||||
# define SPROUT_LANG_OBJC 1
|
||||
#endif
|
||||
|
||||
#if SPROUT_LANG_OBJC
|
||||
# define SPROUT_LANG_OBJC_AVAILABLE
|
||||
# define SPROUT_LANG_OBJC_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define SPROUT_LANG_OBJC_NAME "Objective-C"
|
||||
|
|
|
@ -14,20 +14,20 @@
|
|||
#define SPROUT_LANG_STDC 0
|
||||
|
||||
#if defined(__STDC__)
|
||||
# undef SPROUT_LANG_STDC
|
||||
# if defined(__STDC_VERSION__)
|
||||
# if (__STDC_VERSION__ > 100)
|
||||
# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
|
||||
# else
|
||||
# define SPROUT_LANG_STDC 1
|
||||
# endif
|
||||
# else
|
||||
# define SPROUT_LANG_STDC 1
|
||||
# endif
|
||||
# undef SPROUT_LANG_STDC
|
||||
# if defined(__STDC_VERSION__)
|
||||
# if (__STDC_VERSION__ > 100)
|
||||
# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
|
||||
# else
|
||||
# define SPROUT_LANG_STDC 1
|
||||
# endif
|
||||
# else
|
||||
# define SPROUT_LANG_STDC 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SPROUT_LANG_STDC
|
||||
# define SPROUT_LANG_STDC_AVAILABLE
|
||||
# define SPROUT_LANG_STDC_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define SPROUT_LANG_STDC_NAME "Standard C"
|
||||
|
|
|
@ -14,16 +14,16 @@
|
|||
#define SPROUT_LANG_STDCPP 0
|
||||
|
||||
#if defined(__cplusplus)
|
||||
# undef SPROUT_LANG_STDCPP
|
||||
# if (__cplusplus > 100)
|
||||
# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus)
|
||||
# else
|
||||
# define SPROUT_LANG_STDCPP 1
|
||||
# endif
|
||||
# undef SPROUT_LANG_STDCPP
|
||||
# if (__cplusplus > 100)
|
||||
# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus)
|
||||
# else
|
||||
# define SPROUT_LANG_STDCPP 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SPROUT_LANG_STDCPP
|
||||
# define SPROUT_LANG_STDCPP_AVAILABLE
|
||||
# define SPROUT_LANG_STDCPP_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define SPROUT_LANG_STDCPP_NAME "Standard C++"
|
||||
|
@ -31,16 +31,16 @@
|
|||
#define SPROUT_LANG_STDCPPCLI 0
|
||||
|
||||
#if defined(__cplusplus_cli)
|
||||
# undef SPROUT_LANG_STDCPPCLI
|
||||
# if (__cplusplus_cli > 100)
|
||||
# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
|
||||
# else
|
||||
# define SPROUT_LANG_STDCPPCLI 1
|
||||
# endif
|
||||
# undef SPROUT_LANG_STDCPPCLI
|
||||
# if (__cplusplus_cli > 100)
|
||||
# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
|
||||
# else
|
||||
# define SPROUT_LANG_STDCPPCLI 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SPROUT_LANG_STDCPPCLI
|
||||
# define SPROUT_LANG_STDCPPCLI_AVAILABLE
|
||||
# define SPROUT_LANG_STDCPPCLI_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define SPROUT_LANG_STDCPPCLI_NAME "Standard C++/CLI"
|
||||
|
@ -48,12 +48,12 @@
|
|||
#define SPROUT_LANG_STDECPP 0
|
||||
|
||||
#if defined(__embedded_cplusplus)
|
||||
# undef SPROUT_LANG_STDECPP
|
||||
# define SPROUT_LANG_STDECPP 1
|
||||
# undef SPROUT_LANG_STDECPP
|
||||
# define SPROUT_LANG_STDECPP 1
|
||||
#endif
|
||||
|
||||
#if SPROUT_LANG_STDECPP
|
||||
# define SPROUT_LANG_STDECPP_AVAILABLE
|
||||
# define SPROUT_LANG_STDECPP_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define SPROUT_LANG_STDECPP_NAME "Standard Embedded C++"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
// SPROUT_VERSION_NUMBER
|
||||
//
|
||||
#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
|
||||
|
@ -22,19 +22,19 @@
|
|||
// SPROUT_VERSION_NUMBER_ZERO
|
||||
//
|
||||
#define SPROUT_VERSION_NUMBER_MAX \
|
||||
SPROUT_VERSION_NUMBER(99, 99, 99999)
|
||||
SPROUT_VERSION_NUMBER(99, 99, 99999)
|
||||
#define SPROUT_VERSION_NUMBER_MIN \
|
||||
SPROUT_VERSION_NUMBER(0, 0, 1)
|
||||
SPROUT_VERSION_NUMBER(0, 0, 1)
|
||||
#define SPROUT_VERSION_NUMBER_ZERO \
|
||||
SPROUT_VERSION_NUMBER(0, 0, 0)
|
||||
SPROUT_VERSION_NUMBER(0, 0, 0)
|
||||
|
||||
//
|
||||
// SPROUT_VERSION_NUMBER_AVAILABLE
|
||||
// SPROUT_VERSION_NUMBER_NOT_AVAILABLE
|
||||
//
|
||||
#define SPROUT_VERSION_NUMBER_AVAILABLE \
|
||||
SPROUT_VERSION_NUMBER_MIN
|
||||
SPROUT_VERSION_NUMBER_MIN
|
||||
#define SPROUT_VERSION_NUMBER_NOT_AVAILABLE \
|
||||
SPROUT_VERSION_NUMBER_ZERO
|
||||
SPROUT_VERSION_NUMBER_ZERO
|
||||
|
||||
#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
implicit_cast(typename sprout::identity<T>::type t) {
|
||||
return t;
|
||||
return t;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <sprout/detail/predef.hpp>
|
||||
|
||||
#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>
|
||||
#
|
||||
# if defined(__STDDEF_H)
|
||||
|
@ -21,7 +21,7 @@ struct max_align_t {
|
|||
long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
|
||||
};
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
|
Loading…
Reference in a new issue