diff --git a/include/sqlpp11/core/clause/cte.h b/include/sqlpp11/core/clause/cte.h index 9d73380e..88a7c09e 100644 --- a/include/sqlpp11/core/clause/cte.h +++ b/include/sqlpp11/core/clause/cte.h @@ -141,7 +141,7 @@ namespace sqlpp struct check_cte_union { using type = static_combined_check_t< - static_check_t::value...>::value, assert_cte_union_args_are_statements_t>>; + static_check_t::value...>::value, assert_cte_union_args_are_statements_t>>; }; template using check_cte_union_t = typename check_cte_union::type; diff --git a/include/sqlpp11/core/clause/group_by.h b/include/sqlpp11/core/clause/group_by.h index de96ed34..687a3798 100644 --- a/include/sqlpp11/core/clause/group_by.h +++ b/include/sqlpp11/core/clause/group_by.h @@ -93,7 +93,7 @@ namespace sqlpp struct check_group_by { using type = static_combined_check_t< - static_check_t::value...>::value, assert_group_by_args_are_columns_t>>; + static_check_t::value...>::value, assert_group_by_args_are_columns_t>>; }; template using check_group_by_t = typename check_group_by::type; diff --git a/include/sqlpp11/core/clause/having.h b/include/sqlpp11/core/clause/having.h index 72b4e0f1..f455a292 100644 --- a/include/sqlpp11/core/clause/having.h +++ b/include/sqlpp11/core/clause/having.h @@ -109,7 +109,7 @@ namespace sqlpp template constexpr auto are_all_parameters_expressions() -> bool { - return logic::all_t::value...>::value; + return logic::all::value...>::value; } // NO HAVING YET @@ -135,7 +135,7 @@ namespace sqlpp // workaround for msvc bug https://connect.microsoft.com/VisualStudio/Feedback/Details/2173269 // template - // using _check = logic::all_t::value...>; + // using _check = logic::all::value...>; template struct _check : std::integral_constant()> { diff --git a/include/sqlpp11/core/clause/insert_value_list.h b/include/sqlpp11/core/clause/insert_value_list.h index 8eb6ebfc..ff2e4ed0 100644 --- a/include/sqlpp11/core/clause/insert_value_list.h +++ b/include/sqlpp11/core/clause/insert_value_list.h @@ -147,7 +147,7 @@ namespace sqlpp template using check_insert_set_t = static_combined_check_t< - static_check_t::value...>::value, + static_check_t::value...>::value, assert_insert_set_assignments_t>, static_check_t::type...>::value, assert_insert_set_no_duplicates_t>, @@ -260,13 +260,13 @@ namespace sqlpp template void add_values(Assignments... assignments) { - static_assert(logic::all_t::value...>::value, + static_assert(logic::all::value...>::value, "add_values() arguments have to be assignments"); using _arg_value_tuple = std::tuple>...>; using _args_correct = std::is_same<_arg_value_tuple, _value_tuple_t>; static_assert(_args_correct::value, "add_values() arguments do not match columns() arguments"); - using ok = logic::all_t::value...>::value, _args_correct::value>; + using ok = logic::all::value...>::value, _args_correct::value>; _add_impl(ok(), assignments...); // dispatch to prevent compile messages after the static_assert } @@ -303,7 +303,7 @@ namespace sqlpp struct check_insert_columns { using type = static_combined_check_t< - static_check_t::value...>::value, assert_insert_columns_are_columns>>; + static_check_t::value...>::value, assert_insert_columns_are_columns>>; }; template using check_insert_columns_t = typename check_insert_columns::type; diff --git a/include/sqlpp11/core/clause/order_by.h b/include/sqlpp11/core/clause/order_by.h index e9653839..10a4e066 100644 --- a/include/sqlpp11/core/clause/order_by.h +++ b/include/sqlpp11/core/clause/order_by.h @@ -86,7 +86,7 @@ namespace sqlpp template struct check_order_by { - using type = static_combined_check_t::value...>::value, + using type = static_combined_check_t::value...>::value, assert_order_by_args_are_sort_order_expressions_t>>; }; template diff --git a/include/sqlpp11/core/clause/select_column_list.h b/include/sqlpp11/core/clause/select_column_list.h index 2130cda5..5ba0aff1 100644 --- a/include/sqlpp11/core/clause/select_column_list.h +++ b/include/sqlpp11/core/clause/select_column_list.h @@ -233,8 +233,8 @@ namespace sqlpp : public std::integral_constant< bool, (detail::type_vector_size::value == 0 and - logic::none_t>>::value...>::value) or - logic::all_t>>::value...>::value) or + logic::all>>::value...>::value> { }; @@ -258,7 +258,7 @@ namespace sqlpp struct check_selected_tuple> { using type = static_combined_check_t< - static_check_t::value and select_column_has_name::value)...>::value, + static_check_t::value and select_column_has_name::value)...>::value, assert_selected_colums_are_selectable_t>>; }; template diff --git a/include/sqlpp11/core/clause/select_flag_list.h b/include/sqlpp11/core/clause/select_flag_list.h index 1e78e640..ab232d5d 100644 --- a/include/sqlpp11/core/clause/select_flag_list.h +++ b/include/sqlpp11/core/clause/select_flag_list.h @@ -81,7 +81,7 @@ namespace sqlpp struct check_select_flags { using type = static_combined_check_t< - static_check_t::value...>::value, assert_select_flags_are_flags_t>>; + static_check_t::value...>::value, assert_select_flags_are_flags_t>>; }; template using check_select_flags_t = typename check_select_flags::type; diff --git a/include/sqlpp11/core/clause/union.h b/include/sqlpp11/core/clause/union.h index 9fe191cf..5441497a 100644 --- a/include/sqlpp11/core/clause/union.h +++ b/include/sqlpp11/core/clause/union.h @@ -98,7 +98,7 @@ namespace sqlpp struct check_union { using type = static_combined_check_t< - static_check_t::value...>::value, assert_union_args_are_statements_t>>; + static_check_t::value...>::value, assert_union_args_are_statements_t>>; }; template using check_union_t = typename check_union::type; diff --git a/include/sqlpp11/core/clause/update_list.h b/include/sqlpp11/core/clause/update_list.h index 6c727074..a53903c6 100644 --- a/include/sqlpp11/core/clause/update_list.h +++ b/include/sqlpp11/core/clause/update_list.h @@ -91,7 +91,7 @@ namespace sqlpp template using check_update_set_t = static_combined_check_t< - static_check_t::value...>::value, + static_check_t::value...>::value, assert_update_set_assignments_t>, static_check_t::type...>::value, assert_update_set_no_duplicates_t>, diff --git a/include/sqlpp11/core/clause/using.h b/include/sqlpp11/core/clause/using.h index 3d5504cd..96b55a16 100644 --- a/include/sqlpp11/core/clause/using.h +++ b/include/sqlpp11/core/clause/using.h @@ -79,7 +79,7 @@ namespace sqlpp struct check_using { using type = static_combined_check_t< - static_check_t::value...>::value, assert_using_args_are_tables_t>>; + static_check_t::value...>::value, assert_using_args_are_tables_t>>; }; template using check_using_t = typename check_using::type; diff --git a/include/sqlpp11/core/clause/where.h b/include/sqlpp11/core/clause/where.h index a88e75e2..a37dcdaf 100644 --- a/include/sqlpp11/core/clause/where.h +++ b/include/sqlpp11/core/clause/where.h @@ -117,9 +117,9 @@ namespace sqlpp // https://connect.microsoft.com/VisualStudio/feedback/details/2173198 // template // using check_where_t = static_combined_check_t< - // static_check_t::value...>::value, + // static_check_t::value...>::value, // assert_where_arg_is_boolean_expression_t>, - // static_check_t::value)...>::value, + // static_check_t::value)...>::value, // assert_where_arg_contains_no_aggregate_t>>; template struct check_where diff --git a/include/sqlpp11/core/clause/with.h b/include/sqlpp11/core/clause/with.h index 9559a3c2..8cb161c7 100644 --- a/include/sqlpp11/core/clause/with.h +++ b/include/sqlpp11/core/clause/with.h @@ -42,7 +42,7 @@ namespace sqlpp template struct with_data_t { - using _is_recursive = logic::any_t; + using _is_recursive = logic::any; with_data_t(Expressions... expressions) : _expressions(expressions...) { @@ -140,9 +140,9 @@ namespace sqlpp template auto with(Expressions... cte) -> blank_with_t { - static_assert(logic::all_t::value...>::value, + static_assert(logic::all::value...>::value, "at least one expression in with is not a common table expression"); - static_assert(logic::none_t::value...>::value, + static_assert(logic::none::value...>::value, "at least one expression in with is an incomplete common table expression"); return {{cte...}}; } diff --git a/include/sqlpp11/core/detail/type_set.h b/include/sqlpp11/core/detail/type_set.h index edbaff95..f00ff4ec 100644 --- a/include/sqlpp11/core/detail/type_set.h +++ b/include/sqlpp11/core/detail/type_set.h @@ -238,7 +238,7 @@ namespace sqlpp struct make_intersect_set, type_set> { template - using is_in_both = ::sqlpp::logic::all_t::template count(), + using is_in_both = ::sqlpp::logic::all::template count(), type_set::template count()>; using type = make_type_set_if_t; }; diff --git a/include/sqlpp11/core/detail/type_vector.h b/include/sqlpp11/core/detail/type_vector.h index 90bf40a0..bc0ae103 100644 --- a/include/sqlpp11/core/detail/type_vector.h +++ b/include/sqlpp11/core/detail/type_vector.h @@ -37,7 +37,7 @@ namespace sqlpp struct type_vector { template - using contains = std::integral_constant::value...>::value>; + using contains = std::integral_constant::value...>::value>; }; template diff --git a/include/sqlpp11/core/logic.h b/include/sqlpp11/core/logic.h index be3ffd33..6553168e 100644 --- a/include/sqlpp11/core/logic.h +++ b/include/sqlpp11/core/logic.h @@ -1,7 +1,7 @@ #pragma once /* - * Copyright (c) 2013-2015, Roland Bock + * Copyright (c) 2013, Roland Bock * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -38,50 +38,22 @@ namespace sqlpp // see http://lists.boost.org/Archives/boost/2014/05/212946.php :-) - // workaround for msvc bug https://connect.microsoft.com/VisualStudio/Feedback/Details/2086629 template - struct all + struct all : public std::is_same, logic_helper<(B or true)...>> { - using type = std::is_same, logic_helper<(B or true)...>>; }; - template - using all_t = std::is_same, logic_helper<(B or true)...>>; - - // workaround for msvc bug https://connect.microsoft.com/VisualStudio/Feedback/Details/2086629 template struct any + : public std::integral_constant, logic_helper<(B and false)...>>::value> { - using type = - std::integral_constant, logic_helper<(B and false)...>>::value>; }; template - using any_t = - std::integral_constant, logic_helper<(B and false)...>>::value>; - - template - using none_t = std::is_same, logic_helper<(B and false)...>>; - - template - struct not_impl; - - template <> - struct not_impl + struct none : public std::is_same, logic_helper<(B and false)...>> { - using type = std::false_type; }; - template <> - struct not_impl - { - using type = std::true_type; - }; - - template