mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
Adjusted type_traits to compile with clang-3.1, too
The new version is cleaner anyway, since it can be used with any type now.
This commit is contained in:
parent
7938a8527c
commit
69fdaedc0d
@ -33,19 +33,19 @@
|
|||||||
namespace sqlpp
|
namespace sqlpp
|
||||||
{
|
{
|
||||||
#define SQLPP_IS_VALUE_TRAIT_GENERATOR(name) \
|
#define SQLPP_IS_VALUE_TRAIT_GENERATOR(name) \
|
||||||
|
namespace tag\
|
||||||
|
{\
|
||||||
|
struct name{};\
|
||||||
|
};\
|
||||||
namespace detail\
|
namespace detail\
|
||||||
{\
|
{\
|
||||||
template<typename T, typename Enable = void>\
|
template<typename T, typename Enable = void>\
|
||||||
struct is_##name##_impl: std::false_type {};\
|
struct is_##name##_impl: std::false_type {};\
|
||||||
template<typename T>\
|
template<typename T>\
|
||||||
struct is_##name##_impl<T, typename std::enable_if<std::is_same<typename T::_value_type::_is_##name, std::true_type>::value>::type>: std::true_type {};\
|
struct is_##name##_impl<T, typename std::enable_if<detail::is_element_of<tag::name, typename T::_traits::_tags>::value>::type>: std::true_type {};\
|
||||||
}\
|
}\
|
||||||
namespace tag\
|
|
||||||
{\
|
|
||||||
struct name{};\
|
|
||||||
};\
|
|
||||||
template<typename T>\
|
template<typename T>\
|
||||||
using is_##name##_t = detail::is_element_of<tag::name, typename T::_traits::_tags>;
|
using is_##name##_t = typename detail::is_##name##_impl<T>::type;
|
||||||
|
|
||||||
#define SQLPP_IS_COLUMN_TRAIT_GENERATOR(name) \
|
#define SQLPP_IS_COLUMN_TRAIT_GENERATOR(name) \
|
||||||
namespace detail\
|
namespace detail\
|
||||||
|
Loading…
Reference in New Issue
Block a user