mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
erase warnings for clang3.2
This commit is contained in:
parent
d00e971abe
commit
225c11b505
14 changed files with 108 additions and 22 deletions
|
@ -33,6 +33,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -50,6 +54,9 @@ namespace std {
|
|||
static_assert(I < N, "tuple_element<>: index out of range");
|
||||
typedef T type;
|
||||
};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_ARRAY_TUPLE_HPP
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <sprout/operation/fixed/set.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/bit/operation.hpp>
|
||||
#include <sprout/math/comparison.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT
|
||||
#include HDR_NUMERIC_SSCRISK_CEL_OR_SPROUT
|
||||
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT
|
||||
|
@ -129,7 +130,7 @@ namespace sprout {
|
|||
{
|
||||
return base_bitset(
|
||||
sprout::detail::base_bitset_from_words_construct_tag(),
|
||||
(static_cast<std::size_t>(Indexes) > wshift
|
||||
(sprout::math::greater(Indexes, wshift)
|
||||
? (w_[Indexes - wshift] << offset) | (w_[Indexes - wshift - 1] >> sub_offset)
|
||||
: Indexes == wshift ? w_[0] << offset
|
||||
: static_cast<word_type>(0)
|
||||
|
@ -145,7 +146,7 @@ namespace sprout {
|
|||
{
|
||||
return base_bitset(
|
||||
sprout::detail::base_bitset_from_words_construct_tag(),
|
||||
(static_cast<std::size_t>(Indexes) >= wshift ? w_[Indexes - wshift]
|
||||
(sprout::math::greater_equal(Indexes, wshift) ? w_[Indexes - wshift]
|
||||
: static_cast<word_type>(0)
|
||||
)...
|
||||
);
|
||||
|
@ -172,7 +173,7 @@ namespace sprout {
|
|||
{
|
||||
return base_bitset(
|
||||
sprout::detail::base_bitset_from_words_construct_tag(),
|
||||
(static_cast<std::size_t>(Indexes) < limit
|
||||
(sprout::math::less(Indexes, limit)
|
||||
? (w_[Indexes + wshift] >> offset) | (w_[Indexes + wshift + 1] << sub_offset)
|
||||
: Indexes == limit ? w_[N-1] >> offset
|
||||
: static_cast<word_type>(0)
|
||||
|
@ -188,7 +189,7 @@ namespace sprout {
|
|||
{
|
||||
return base_bitset(
|
||||
sprout::detail::base_bitset_from_words_construct_tag(),
|
||||
(static_cast<std::size_t>(Indexes) <= limit ? w_[Indexes + wshift]
|
||||
(sprout::math::less_equal(Indexes, limit) ? w_[Indexes + wshift]
|
||||
: static_cast<word_type>(0)
|
||||
)...
|
||||
)
|
||||
|
|
|
@ -5,37 +5,37 @@
|
|||
# include <sprout/config/compiler/gcc_xml.hpp>
|
||||
#elif defined(_CRAYC)
|
||||
# include <sprout/config/compiler/cray.hpp>
|
||||
#elif defined __CUDACC__
|
||||
#elif defined(__CUDACC__)
|
||||
# include <sprout/config/compiler/nvcc.hpp>
|
||||
#elif defined __COMO__
|
||||
#elif defined(__COMO__)
|
||||
# include <sprout/config/compiler/comeau.hpp>
|
||||
#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
|
||||
# include <sprout/config/compiler/pathscale.hpp>
|
||||
#elif defined __clang__
|
||||
#elif defined(__clang__)
|
||||
# include <sprout/config/compiler/clang.hpp>
|
||||
#elif defined __DMC__
|
||||
#elif defined(__DMC__)
|
||||
# include <sprout/config/compiler/digitalmars.hpp>
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
# include <sprout/config/compiler/intel.hpp>
|
||||
# elif defined __GNUC__
|
||||
# elif defined(__GNUC__)
|
||||
# include <sprout/config/compiler/gcc.hpp>
|
||||
#elif defined __KCC
|
||||
#elif defined(__KCC)
|
||||
# include <sprout/config/compiler/kai.hpp>
|
||||
#elif defined __sgi
|
||||
#elif defined(__sgi)
|
||||
# include <sprout/config/compiler/sgi_mipspro.hpp>
|
||||
#elif defined __DECCXX
|
||||
#elif defined(__DECCXX)
|
||||
# include <sprout/config/compiler/compaq_cxx.hpp>
|
||||
#elif defined __ghs
|
||||
#elif defined(__ghs)
|
||||
# include <sprout/config/compiler/greenhills.hpp>
|
||||
#elif defined __CODEGEARC__
|
||||
#elif defined(__CODEGEARC__)
|
||||
# include <sprout/config/compiler/codegear.hpp>
|
||||
#elif defined __BORLANDC__
|
||||
#elif defined(__BORLANDC__)
|
||||
# include <sprout/config/compiler/borland.hpp>
|
||||
#elif defined __MWERKS__
|
||||
#elif defined( __MWERKS__)
|
||||
# include <sprout/config/compiler/metrowerks.hpp>
|
||||
#elif defined __SUNPRO_CC
|
||||
#elif defined( __SUNPRO_CC)
|
||||
# include <sprout/config/compiler/sunpro_cc.hpp>
|
||||
#elif defined __HP_aCC
|
||||
#elif defined(__HP_aCC)
|
||||
# include <sprout/config/compiler/hp_acc.hpp>
|
||||
#elif defined(__MRC__) || defined(__SC__)
|
||||
# include <sprout/config/compiler/mpw.hpp>
|
||||
|
|
|
@ -34,6 +34,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -49,6 +53,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::pit<Container> >
|
||||
: public std::tuple_element<I, Container>
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_PIT_TUPLE_HPP
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <limits>
|
||||
#include <ios>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/random/detail/const_mod.hpp>
|
||||
#include <sprout/random/random_result.hpp>
|
||||
|
@ -32,7 +33,14 @@ namespace sprout {
|
|||
static SPROUT_CONSTEXPR result_type static_max() {
|
||||
return modulus - 1;
|
||||
}
|
||||
static SPROUT_CONSTEXPR bool arg_check_nothrow(IntType const& x0) {
|
||||
template<typename T>
|
||||
static SPROUT_CONSTEXPR typename std::enable_if<!(b == 0) && std::is_unsigned<T>::value, bool>::type
|
||||
arg_check_nothrow(T const& x0) {
|
||||
return x0 <= static_max();
|
||||
}
|
||||
template<typename T>
|
||||
static SPROUT_CONSTEXPR typename std::enable_if<!(!(b == 0) && std::is_unsigned<T>::value), bool>::type
|
||||
arg_check_nothrow(T const& x0) {
|
||||
return x0 >= static_min() && x0 <= static_max();
|
||||
}
|
||||
static SPROUT_CONSTEXPR IntType arg_check(IntType const& x0) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <limits>
|
||||
#include <ios>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/random/detail/const_mod.hpp>
|
||||
#include <sprout/random/random_result.hpp>
|
||||
|
@ -36,12 +37,18 @@ namespace sprout {
|
|||
static SPROUT_CONSTEXPR result_type static_max() {
|
||||
return modulus - 1;
|
||||
}
|
||||
static SPROUT_CONSTEXPR bool arg_check_nothrow(IntType const& x0) {
|
||||
template<typename T>
|
||||
static SPROUT_CONSTEXPR typename std::enable_if<!(c == 0) && std::is_unsigned<T>::value, bool>::type
|
||||
arg_check_nothrow(T const& x0) {
|
||||
return x0 <= static_max();
|
||||
}
|
||||
template<typename T>
|
||||
static SPROUT_CONSTEXPR typename std::enable_if<!(!(c == 0) && std::is_unsigned<T>::value), bool>::type
|
||||
arg_check_nothrow(T const& x0) {
|
||||
return x0 >= static_min() && x0 <= static_max();
|
||||
}
|
||||
static SPROUT_CONSTEXPR IntType arg_check(IntType const& x0) {
|
||||
return arg_check_nothrow(x0)
|
||||
? x0
|
||||
return arg_check_nothrow(x0) ? x0
|
||||
: throw std::invalid_argument("linear_congruential_engine<>: invalid argument (x0 >= static_min() && x0 <= static_max())")
|
||||
;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -50,6 +54,9 @@ namespace std {
|
|||
static_assert(I < N, "tuple_element<>: index out of range");
|
||||
typedef T type;
|
||||
};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_STRING_TUPLE_HPP
|
||||
|
|
|
@ -43,6 +43,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -58,6 +62,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::sub_array<Container> >
|
||||
: public std::tuple_element<I, typename std::remove_reference<Container>::type>
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_SUB_ARRAY_TUPLE_HPP
|
||||
|
|
|
@ -339,6 +339,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -354,6 +358,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::tuples::tuple<Types...> >
|
||||
: public sprout::tuples::detail::tuple_element_impl<I, sprout::tuples::tuple<Types...> >
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_TUPLE_TUPLE_TUPLE_HPP
|
||||
|
|
|
@ -24,6 +24,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -39,6 +43,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::types::integral_array<T, Values...> >
|
||||
: public std::tuple_element<I, sprout::types::type_tuple<std::integral_constant<T, Values>...> >
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_INTEGRAL_ARRAY_HPP
|
||||
|
|
|
@ -20,6 +20,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -35,6 +39,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::types::basic_string<T, Values...> >
|
||||
: public std::tuple_element<I, sprout::types::integral_array<T, Values...> >
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_STRING_STRING_HPP
|
||||
|
|
|
@ -55,6 +55,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -70,6 +74,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::types::type_tuple<Types...> >
|
||||
: public sprout::types::detail::tuple_element_impl<I, sprout::types::type_tuple<Types...> >
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TYPE_TUPLE_HPP
|
||||
|
|
|
@ -50,6 +50,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -65,6 +69,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::pair<T1, T2> >
|
||||
: public sprout::tuples::detail::tuple_element_impl<I, sprout::pair<T1, T2> >
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
namespace sprout {
|
||||
|
|
|
@ -39,6 +39,10 @@ namespace sprout {
|
|||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
|
@ -54,6 +58,9 @@ namespace std {
|
|||
struct tuple_element<I, sprout::variant<Types...> >
|
||||
: public std::tuple_element<I, typename sprout::variant<Types...>::tuple_type>
|
||||
{};
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_VARIANT_TUPLE_HPP
|
||||
|
|
Loading…
Reference in a new issue