From 77d737b401158350a918985bf729710a15ecbf6f Mon Sep 17 00:00:00 2001 From: rbock Date: Sat, 22 Nov 2014 21:41:43 +0100 Subject: [PATCH] Minor cleanup in type_sets --- include/sqlpp11/detail/type_set.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/include/sqlpp11/detail/type_set.h b/include/sqlpp11/detail/type_set.h index a9cc7494..3b4d48d6 100644 --- a/include/sqlpp11/detail/type_set.h +++ b/include/sqlpp11/detail/type_set.h @@ -39,6 +39,9 @@ namespace sqlpp template struct make_type_set; + template + using make_type_set_t = typename make_type_set::type; + template struct is_element_of; @@ -49,7 +52,7 @@ namespace sqlpp using size = std::integral_constant; using _is_type_set = std::true_type; - static_assert(std::is_same::type>::value, "use make_type_set to construct a set"); + static_assert(std::is_same>::value, "use make_type_set to construct a typeset"); template struct insert @@ -90,7 +93,7 @@ namespace sqlpp template struct joined_set, type_set> { - using type = typename make_type_set::type; + using type = make_type_set_t; }; template @@ -138,9 +141,6 @@ namespace sqlpp using type = typename make_type_set::type::template insert::type; }; - template - using make_type_set_t = typename make_type_set::type; - template class Predicate, typename... T> struct make_type_set_if; @@ -167,8 +167,11 @@ namespace sqlpp using type = typename make_type_set_if::type; }; + template class Predicate, typename... T> + using make_type_set_if_not_t = typename make_type_set_if_not::type; + template - using has_duplicates = std::integral_constant::type::size::value != sizeof...(T)>; + using has_duplicates = std::integral_constant::size::value != sizeof...(T)>; template struct make_joined_set @@ -204,7 +207,7 @@ namespace sqlpp { template using is_subtrahend = is_element_of>; - using type = typename make_type_set_if_not::type; + using type = make_type_set_if_not_t; }; template @@ -221,7 +224,7 @@ namespace sqlpp { template using is_in_both = all_t>::value, is_element_of>::value>; - using type = typename make_type_set_if::type; + using type = make_type_set_if_t; }; template @@ -237,7 +240,7 @@ namespace sqlpp template class Transformation, typename... E> struct transform_set> { - using type = typename make_type_set...>::type; + using type = make_type_set_t...>; }; template class Transformation, typename T>