From 4ac4b1820b9fc650d61bef856e28cea6cdb6cb14 Mon Sep 17 00:00:00 2001 From: rbock Date: Wed, 27 Aug 2014 20:43:09 +0200 Subject: [PATCH] Removed stray sqlpp namespace qualifiers The usage was very inconsistent. Also, I just saw that the current VC++ cannot deal with qualifiers in combination with template aliases --- include/sqlpp11/all_of.h | 2 +- include/sqlpp11/any.h | 2 +- include/sqlpp11/assignment.h | 2 +- include/sqlpp11/avg.h | 8 +++--- include/sqlpp11/boolean.h | 4 +-- include/sqlpp11/column.h | 12 ++++----- include/sqlpp11/concat.h | 4 +-- include/sqlpp11/count.h | 8 +++--- include/sqlpp11/detail/copy_tuple_args.h | 4 +-- include/sqlpp11/detail/type_set.h | 16 ++++++------ include/sqlpp11/exists.h | 2 +- include/sqlpp11/expression.h | 10 ++++---- include/sqlpp11/expression_fwd.h | 22 ++++++++-------- include/sqlpp11/extra_tables.h | 16 ++++++------ include/sqlpp11/floating_point.h | 4 +-- include/sqlpp11/from.h | 8 +++--- include/sqlpp11/functions.h | 2 +- include/sqlpp11/group_by.h | 10 ++++---- include/sqlpp11/having.h | 8 +++--- include/sqlpp11/in.h | 2 +- include/sqlpp11/insert_value.h | 2 +- include/sqlpp11/insert_value_list.h | 32 ++++++++++++------------ include/sqlpp11/integral.h | 4 +-- include/sqlpp11/interpret_tuple.h | 4 +-- include/sqlpp11/interpretable.h | 12 ++++----- include/sqlpp11/into.h | 4 +-- include/sqlpp11/is_null.h | 6 ++--- include/sqlpp11/join.h | 2 +- include/sqlpp11/like.h | 2 +- include/sqlpp11/limit.h | 6 ++--- include/sqlpp11/max.h | 2 +- include/sqlpp11/min.h | 2 +- include/sqlpp11/named_interpretable.h | 12 ++++----- include/sqlpp11/noop.h | 2 +- include/sqlpp11/offset.h | 6 ++--- include/sqlpp11/order_by.h | 10 ++++---- include/sqlpp11/parameter_list.h | 4 +-- include/sqlpp11/select_column_list.h | 28 ++++++++++----------- include/sqlpp11/select_flag_list.h | 10 ++++---- include/sqlpp11/select_pseudo_table.h | 2 +- include/sqlpp11/simple_column.h | 2 +- include/sqlpp11/single_table.h | 4 +-- include/sqlpp11/some.h | 2 +- include/sqlpp11/sort_order.h | 2 +- include/sqlpp11/statement.h | 8 +++--- include/sqlpp11/sum.h | 8 +++--- include/sqlpp11/text.h | 4 +-- include/sqlpp11/update_list.h | 16 ++++++------ include/sqlpp11/using.h | 10 ++++---- include/sqlpp11/verbatim.h | 2 +- include/sqlpp11/verbatim_table.h | 4 +-- include/sqlpp11/where.h | 12 ++++----- include/sqlpp11/wrap_operand.h | 8 +++--- 53 files changed, 190 insertions(+), 190 deletions(-) diff --git a/include/sqlpp11/all_of.h b/include/sqlpp11/all_of.h index 0af691a4..021da0a8 100644 --- a/include/sqlpp11/all_of.h +++ b/include/sqlpp11/all_of.h @@ -41,7 +41,7 @@ namespace sqlpp template detail::copy_tuple_args_t as(const AliasProvider& alias) { - return ::sqlpp::multi_column(_column_tuple_t{}).as(alias); + return multi_column(_column_tuple_t{}).as(alias); } }; diff --git a/include/sqlpp11/any.h b/include/sqlpp11/any.h index 708911d9..79d6aada 100644 --- a/include/sqlpp11/any.h +++ b/include/sqlpp11/any.h @@ -35,7 +35,7 @@ namespace sqlpp template struct any_t { - using _traits = make_traits, ::sqlpp::tag::is_multi_expression>; + using _traits = make_traits, tag::is_multi_expression>; using _recursive_traits = make_recursive_traits; static_assert(is_select_t; struct _name_t diff --git a/include/sqlpp11/sort_order.h b/include/sqlpp11/sort_order.h index 0a5053f2..fbb1a1d8 100644 --- a/include/sqlpp11/sort_order.h +++ b/include/sqlpp11/sort_order.h @@ -41,7 +41,7 @@ namespace sqlpp template struct sort_order_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits; Expression _expression; diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index d427374a..e7a3778e 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -109,7 +109,7 @@ namespace sqlpp using _parameters = detail::make_parameter_tuple_t...>; using _can_be_null = detail::any_t< can_be_null_t<_result_type_provider>::value, - ::sqlpp::detail::make_intersect_set_t< + detail::make_intersect_set_t< required_tables_of<_result_type_provider>, provided_outer_tables_of >::size::value != 0>; @@ -129,7 +129,7 @@ namespace sqlpp using _policies_t = typename detail::statement_policies_t; using _traits = make_traits, - ::sqlpp::tag::is_select, + tag::is_select, tag_if::value>, tag_if::value>, tag::requires_braces>; @@ -184,7 +184,7 @@ namespace sqlpp struct serializer_t> { using T = statement_t; - using P = ::sqlpp::detail::statement_policies_t; + using P = detail::statement_policies_t; static Context& _(const T& t, Context& context) { @@ -198,7 +198,7 @@ namespace sqlpp template struct statement_name_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; // Data diff --git a/include/sqlpp11/sum.h b/include/sqlpp11/sum.h index 2cb26d0b..468ac230 100644 --- a/include/sqlpp11/sum.h +++ b/include/sqlpp11/sum.h @@ -36,10 +36,10 @@ namespace sqlpp public expression_operators, value_type_of>, public alias_operators> { - using _traits = make_traits, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_named_expression>; + using _traits = make_traits, tag::is_expression, tag::is_named_expression>; using _recursive_traits = make_recursive_traits; - static_assert(is_noop::value or std::is_same::value, "sum() used with flag other than 'distinct'"); + static_assert(is_noop::value or std::is_same::value, "sum() used with flag other than 'distinct'"); static_assert(is_numeric_t::value, "sum() requires a numeric expression as argument"); struct _name_t @@ -75,7 +75,7 @@ namespace sqlpp static Context& _(const T& t, Context& context) { context << "SUM("; - if (std::is_same::value) + if (std::is_same::value) { serialize(Flag(), context); context << ' '; @@ -94,7 +94,7 @@ namespace sqlpp } template - auto sum(const sqlpp::distinct_t&, T t) -> sum_t> + auto sum(const distinct_t&, T t) -> sum_t> { static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); return { t }; diff --git a/include/sqlpp11/text.h b/include/sqlpp11/text.h index 8c93d6a9..c42dea5d 100644 --- a/include/sqlpp11/text.h +++ b/include/sqlpp11/text.h @@ -39,8 +39,8 @@ namespace sqlpp // text value type struct text { - using _traits = make_traits; - using _tag = ::sqlpp::tag::is_text; + using _traits = make_traits; + using _tag = tag::is_text; using _cpp_value_type = std::string; template diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/update_list.h index 7cb205ed..425b8b8f 100644 --- a/include/sqlpp11/update_list.h +++ b/include/sqlpp11/update_list.h @@ -56,7 +56,7 @@ namespace sqlpp template struct update_list_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits; using _is_dynamic = is_database; @@ -80,10 +80,10 @@ namespace sqlpp static_assert(is_assignment_t::value, "invalid assignment argument in add()"); using _assigned_columns = detail::make_type_set_t...>; static_assert(not detail::is_element_of, _assigned_columns>::value, "Must not assign value to column twice"); - static_assert(sqlpp::detail::not_t>::value, "add() argument must not be updated"); + static_assert(detail::not_t>::value, "add() argument must not be updated"); static_assert(TableCheckRequired::value or Policies::template _no_unknown_tables::value, "assignment uses tables unknown to this statement in add()"); - using ok = ::sqlpp::detail::all_t< + using ok = detail::all_t< _is_dynamic::value, is_assignment_t::value>; @@ -130,7 +130,7 @@ namespace sqlpp struct no_update_list_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; // Data @@ -193,11 +193,11 @@ namespace sqlpp auto _set_impl(Assignments... assignments) const -> _new_statement_t> { - static_assert(::sqlpp::detail::all_t::value...>::value, "at least one argument is not an assignment in set()"); - static_assert(not ::sqlpp::detail::has_duplicates...>::value, "at least one duplicate column detected in set()"); - static_assert(::sqlpp::detail::none_t>::value...>::value, "at least one assignment is prohibited by its column definition in set()"); + static_assert(detail::all_t::value...>::value, "at least one argument is not an assignment in set()"); + static_assert(not detail::has_duplicates...>::value, "at least one duplicate column detected in set()"); + static_assert(detail::none_t>::value...>::value, "at least one assignment is prohibited by its column definition in set()"); - using _column_required_tables = ::sqlpp::detail::make_joined_set_t>...>; + using _column_required_tables = detail::make_joined_set_t>...>; static_assert(sizeof...(Assignments) ? (_column_required_tables::size::value == 1) : true, "set() contains assignments for columns from more than one table"); return { static_cast&>(*this), update_list_data_t{assignments...} }; diff --git a/include/sqlpp11/using.h b/include/sqlpp11/using.h index f01c45dd..c704dfc4 100644 --- a/include/sqlpp11/using.h +++ b/include/sqlpp11/using.h @@ -57,16 +57,16 @@ namespace sqlpp template struct using_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits; using _is_dynamic = is_database; static_assert(_is_dynamic::value or sizeof...(Tables), "at least one table argument required in using()"); - static_assert(not ::sqlpp::detail::has_duplicates::value, "at least one duplicate argument detected in using()"); + static_assert(not detail::has_duplicates::value, "at least one duplicate argument detected in using()"); - static_assert(::sqlpp::detail::all_t::value...>::value, "at least one argument is not an table in using()"); + static_assert(detail::all_t::value...>::value, "at least one argument is not an table in using()"); // Data using _data_t = using_data_t; @@ -81,7 +81,7 @@ namespace sqlpp static_assert(_is_dynamic::value, "add must not be called for static using()"); static_assert(is_table_t::value, "invalid table argument in add()"); - using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_table_t
::value>; + using ok = detail::all_t<_is_dynamic::value, is_table_t
::value>; _add_impl(table, ok()); // dispatch to prevent compile messages after the static_assert } @@ -128,7 +128,7 @@ namespace sqlpp // NO USING YET struct no_using_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; // Data diff --git a/include/sqlpp11/verbatim.h b/include/sqlpp11/verbatim.h index 21322564..0ea6c61a 100644 --- a/include/sqlpp11/verbatim.h +++ b/include/sqlpp11/verbatim.h @@ -37,7 +37,7 @@ namespace sqlpp public expression_operators, ValueType>, public alias_operators> { - using _traits = make_traits; + using _traits = make_traits; struct _recursive_traits : public make_recursive_traits<> { using _can_be_null = std::true_type; // since we do not know what's going on inside the verbatim, we assume it can be null diff --git a/include/sqlpp11/verbatim_table.h b/include/sqlpp11/verbatim_table.h index e0c248cd..fc53af7f 100644 --- a/include/sqlpp11/verbatim_table.h +++ b/include/sqlpp11/verbatim_table.h @@ -46,9 +46,9 @@ namespace sqlpp }; } - struct verbatim_table_t: public sqlpp::table_t + struct verbatim_table_t: public table_t { - struct _recursive_traits: public sqlpp::table_t::_recursive_traits + struct _recursive_traits: public table_t::_recursive_traits { using _provided_outer_tables = detail::type_set; }; diff --git a/include/sqlpp11/where.h b/include/sqlpp11/where.h index 5d5a113d..7fb09551 100644 --- a/include/sqlpp11/where.h +++ b/include/sqlpp11/where.h @@ -58,14 +58,14 @@ namespace sqlpp template struct where_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits; using _is_dynamic = is_database; static_assert(_is_dynamic::value or sizeof...(Expressions), "at least one expression argument required in where()"); - static_assert(sqlpp::detail::none_t::value...>::value, "at least one argument is an assignment in where()"); - static_assert(sqlpp::detail::all_t::value...>::value, "at least one argument is not valid expression in where()"); + static_assert(detail::none_t::value...>::value, "at least one argument is an assignment in where()"); + static_assert(detail::all_t::value...>::value, "at least one argument is not valid expression in where()"); // Data using _data_t = where_data_t; @@ -87,7 +87,7 @@ namespace sqlpp static_assert(is_expression_t::value, "invalid expression argument in where::add()"); static_assert(not TableCheckRequired::value or Policies::template _no_unknown_tables::value, "expression uses tables unknown to this statement in where::add()"); - using ok = ::sqlpp::detail::all_t<_is_dynamic::value, is_expression_t::value>; + using ok = detail::all_t<_is_dynamic::value, is_expression_t::value>; _add_impl(expression, ok()); // dispatch to prevent compile messages after the static_assert } @@ -141,7 +141,7 @@ namespace sqlpp template<> struct where_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; // Data @@ -184,7 +184,7 @@ namespace sqlpp template struct no_where_t { - using _traits = make_traits; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; // Data diff --git a/include/sqlpp11/wrap_operand.h b/include/sqlpp11/wrap_operand.h index f4b28022..7be274c2 100644 --- a/include/sqlpp11/wrap_operand.h +++ b/include/sqlpp11/wrap_operand.h @@ -42,7 +42,7 @@ namespace sqlpp struct boolean_operand: public alias_operators { - using _traits = make_traits<::sqlpp::boolean, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; using _value_t = bool; @@ -80,7 +80,7 @@ namespace sqlpp struct integral_operand: public alias_operators { - using _traits = make_traits<::sqlpp::integral, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; using _value_t = int64_t; @@ -119,7 +119,7 @@ namespace sqlpp struct floating_point_operand: public alias_operators { - using _traits = make_traits<::sqlpp::floating_point, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; using _value_t = double; @@ -157,7 +157,7 @@ namespace sqlpp struct text_operand: public alias_operators { - using _traits = make_traits<::sqlpp::text, ::sqlpp::tag::is_expression, ::sqlpp::tag::is_wrapped_value>; + using _traits = make_traits; using _recursive_traits = make_recursive_traits<>; using _value_t = std::string;