1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

fix macros for noexcept

This commit is contained in:
bolero-MURAKAMI 2014-08-14 22:55:49 +09:00
parent 23f24450b0
commit 979af136a1
125 changed files with 324 additions and 287 deletions

View file

@ -48,31 +48,31 @@ namespace sprout {
template<typename T>
SPROUT_CONSTEXPR std::size_t
operator()(T&& v)
const SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::to_hash(SPROUT_FORWARD(T, v))))
const SPROUT_NOEXCEPT_IF_EXPR(sprout::to_hash(SPROUT_FORWARD(T, v)))
{
return sprout::to_hash(SPROUT_FORWARD(T, v));
}
};
#define SPROUT_HASH_SPECIALIZE(type) \
#define SPROUT_HASH_SPECIALIZE(TYPE) \
template<> \
struct hash<type> { \
struct hash<TYPE> { \
public: \
typedef type argument_type; \
typedef TYPE argument_type; \
typedef std::size_t result_type; \
public: \
SPROUT_CONSTEXPR std::size_t operator()(type v) const { \
SPROUT_CONSTEXPR std::size_t operator()(TYPE v) const { \
return sprout::to_hash(v); \
} \
}
#define SPROUT_HASH_SPECIALIZE_REF(type) \
#define SPROUT_HASH_SPECIALIZE_REF(TYPE) \
template<> \
struct hash<type> { \
struct hash<TYPE> { \
public: \
typedef type argument_type; \
typedef TYPE argument_type; \
typedef std::size_t result_type; \
public: \
SPROUT_CONSTEXPR std::size_t operator()(type const& v) const { \
SPROUT_CONSTEXPR std::size_t operator()(TYPE const& v) const { \
return sprout::to_hash(v); \
} \
}