From 87302fa27ff2174e9d48c433909df48c6d9ebfd4 Mon Sep 17 00:00:00 2001 From: rbock Date: Sat, 18 Jan 2014 16:10:46 +0100 Subject: [PATCH] Make g++-4.8 compile again --- include/sqlpp11/alias.h | 29 ++++--- include/sqlpp11/any.h | 39 ++++----- include/sqlpp11/avg.h | 35 ++++---- include/sqlpp11/column.h | 23 +++--- include/sqlpp11/count.h | 35 ++++---- include/sqlpp11/exists.h | 35 ++++---- include/sqlpp11/functions.h | 72 +++++++++-------- include/sqlpp11/insert.h | 27 ++++--- include/sqlpp11/join.h | 35 ++++---- include/sqlpp11/max.h | 35 ++++---- include/sqlpp11/min.h | 35 ++++---- include/sqlpp11/multi_column.h | 25 +++--- include/sqlpp11/on.h | 35 ++++---- include/sqlpp11/parameter.h | 23 +++--- include/sqlpp11/remove.h | 29 ++++--- include/sqlpp11/select.h | 85 ++++++++++---------- include/sqlpp11/some.h | 35 ++++---- include/sqlpp11/sort_order.h | 41 +++++----- include/sqlpp11/sum.h | 35 ++++---- include/sqlpp11/table.h | 23 +++--- include/sqlpp11/table_alias.h | 27 ++++--- include/sqlpp11/tvin.h | 65 ++++++++------- include/sqlpp11/update.h | 39 ++++----- include/sqlpp11/vendor/select_flag_list.h | 57 +++++++------ include/sqlpp11/vendor/select_pseudo_table.h | 25 +++--- include/sqlpp11/verbatim_table.h | 23 +++--- 26 files changed, 528 insertions(+), 439 deletions(-) diff --git a/include/sqlpp11/alias.h b/include/sqlpp11/alias.h index 3d740310..179b6c50 100644 --- a/include/sqlpp11/alias.h +++ b/include/sqlpp11/alias.h @@ -45,21 +45,24 @@ namespace sqlpp Expression _expression; }; - template - struct vendor::interpreter_t> - { - using T = expression_alias_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << '('; - interpret(t._expression, context); - context << ") AS "; - context << T::_name_t::_get_name(); - return context; - } - }; + using T = expression_alias_t; + static Context& _(const T& t, Context& context) + { + context << '('; + interpret(t._expression, context); + context << ") AS "; + context << T::_name_t::_get_name(); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/any.h b/include/sqlpp11/any.h index 8a2310dc..4987d1c0 100644 --- a/include/sqlpp11/any.h +++ b/include/sqlpp11/any.h @@ -75,26 +75,29 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::any_t; + static Context& _(const T& t, Context& context) + { + context << "ANY("; + interpret(t._select, context); + context << ")"; + return context; + } + }; + + template + auto any(T&& t) -> typename vendor::any_t::type> + { + return { std::forward(t) }; + } + + } } #endif diff --git a/include/sqlpp11/avg.h b/include/sqlpp11/avg.h index 908b361a..9ca975e6 100644 --- a/include/sqlpp11/avg.h +++ b/include/sqlpp11/avg.h @@ -74,25 +74,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::avg_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "AVG("; - interpret(t._expr, context); - context << ")"; - return context; - } - }; + using T = vendor::avg_t; + + static Context& _(const T& t, Context& context) + { + context << "AVG("; + interpret(t._expr, context); + context << ")"; + return context; + } + }; + } template - auto avg(T&& t) -> typename vendor::avg_t::type> - { - return { std::forward(t) }; - } + auto avg(T&& t) -> typename vendor::avg_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/column.h b/include/sqlpp11/column.h index 397e2fe5..5eda1df1 100644 --- a/include/sqlpp11/column.h +++ b/include/sqlpp11/column.h @@ -78,18 +78,21 @@ namespace sqlpp } }; - template - struct vendor::interpreter_t> - { - using T = column_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << T::_table::_name_t::_get_name() << '.' << T::_name_t::_get_name(); - return context; - } - }; + using T = column_t; + static Context& _(const T& t, Context& context) + { + context << T::_table::_name_t::_get_name() << '.' << T::_name_t::_get_name(); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/count.h b/include/sqlpp11/count.h index aa25d74d..f973e533 100644 --- a/include/sqlpp11/count.h +++ b/include/sqlpp11/count.h @@ -74,25 +74,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::count_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "COUNT("; - interpret(t._expr, context); - context << ")"; - return context; - } - }; + using T = vendor::count_t; + + static Context& _(const T& t, Context& context) + { + context << "COUNT("; + interpret(t._expr, context); + context << ")"; + return context; + } + }; + } template - auto count(T&& t) -> typename vendor::count_t::type> - { - return { std::forward(t) }; - } + auto count(T&& t) -> typename vendor::count_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/exists.h b/include/sqlpp11/exists.h index 80906208..04bd4b03 100644 --- a/include/sqlpp11/exists.h +++ b/include/sqlpp11/exists.h @@ -73,26 +73,29 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::exists_t; + + static Context& _(const T& t, Context& context) + { + context << "EXISTS("; + interpret(t._select, context); + context << ")"; + return context; + } + }; + } template - auto exists(T&& t) -> typename vendor::exists_t::type> - { - return { std::forward(t) }; - } + auto exists(T&& t) -> typename vendor::exists_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/functions.h b/include/sqlpp11/functions.h index 11ced294..e891e584 100644 --- a/include/sqlpp11/functions.h +++ b/include/sqlpp11/functions.h @@ -67,17 +67,20 @@ namespace sqlpp std::string _verbatim; }; - template - struct vendor::interpreter_t> - { - using T = verbatim_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << t._verbatim; - return context; - } - }; + using T = verbatim_t; + + static Context& _(const T& t, Context& context) + { + context << t._verbatim; + return context; + } + }; + } template auto verbatim(StringType&& s) -> verbatim_t @@ -93,7 +96,7 @@ namespace sqlpp interpret(exp, context); return { context.str() }; } - + template struct value_list_t // to be used in .in() method { @@ -103,33 +106,36 @@ namespace sqlpp _container_t _container; }; - template - struct vendor::interpreter_t> - { - using T = value_list_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - bool first = true; - for (const auto& entry: t._container) - { - if (first) - first = false; - else - context << ','; + using T = value_list_t; - interpret(value(entry), context); + static Context& _(const T& t, Context& context) + { + bool first = true; + for (const auto& entry: t._container) + { + if (first) + first = false; + else + context << ','; + + interpret(value(entry), context); + } + return context; } - return context; - } - }; + }; + } template - auto value_list(Container&& c) -> value_list_t::type> - { - static_assert(not is_value_t::type::value_type>::value, "value_list() is to be called with a container of non-sql-type like std::vector, or std::list(string)"); - return { std::forward(c) }; - } + auto value_list(Container&& c) -> value_list_t::type> + { + static_assert(not is_value_t::type::value_type>::value, "value_list() is to be called with a container of non-sql-type like std::vector, or std::list(string)"); + return { std::forward(c) }; + } template constexpr const char* get_sql_name(const T&) diff --git a/include/sqlpp11/insert.h b/include/sqlpp11/insert.h index 12898ebd..6cc89e21 100644 --- a/include/sqlpp11/insert.h +++ b/include/sqlpp11/insert.h @@ -133,19 +133,22 @@ namespace sqlpp InsertList _insert_list; }; - template - struct vendor::interpreter_t> - { - using T = insert_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "INSERT INTO "; - interpret(t._table, context); - interpret(t._insert_list, context); - return context; - } - }; + using T = insert_t; + + static Context& _(const T& t, Context& context) + { + context << "INSERT INTO "; + interpret(t._table, context); + interpret(t._insert_list, context); + return context; + } + }; + } template insert_t::type> insert_into(Table&& table) diff --git a/include/sqlpp11/join.h b/include/sqlpp11/join.h index 64f1f107..c3c84299 100644 --- a/include/sqlpp11/join.h +++ b/include/sqlpp11/join.h @@ -141,24 +141,27 @@ namespace sqlpp }; // FIXME: Need to check if db supports the join type. e.g. sqlite does not support right outer or full outer join - template - struct vendor::interpreter_t> - { - using T = join_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - static_assert(not vendor::is_noop::value, "joined tables require on()"); - interpret(t._lhs, context); - context << JoinType::_name; - context << " JOIN "; - context << "("; - interpret(t._rhs, context); - interpret(t._on, context); - return context; - } - }; + using T = join_t; + static Context& _(const T& t, Context& context) + { + static_assert(not vendor::is_noop::value, "joined tables require on()"); + interpret(t._lhs, context); + context << JoinType::_name; + context << " JOIN "; + context << "("; + interpret(t._rhs, context); + interpret(t._on, context); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/max.h b/include/sqlpp11/max.h index d737ea48..f9c19c33 100644 --- a/include/sqlpp11/max.h +++ b/include/sqlpp11/max.h @@ -74,25 +74,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::max_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "MAX("; - interpret(t._expr, context); - context << ")"; - return context; - } - }; + using T = vendor::max_t; + + static Context& _(const T& t, Context& context) + { + context << "MAX("; + interpret(t._expr, context); + context << ")"; + return context; + } + }; + } template - auto max(T&& t) -> typename vendor::max_t::type> - { - return { std::forward(t) }; - } + auto max(T&& t) -> typename vendor::max_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/min.h b/include/sqlpp11/min.h index 969f6fdd..f2b5c631 100644 --- a/include/sqlpp11/min.h +++ b/include/sqlpp11/min.h @@ -74,25 +74,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::min_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "MIN("; - interpret(t._expr, context); - context << ")"; - return context; - } - }; + using T = vendor::min_t; + + static Context& _(const T& t, Context& context) + { + context << "MIN("; + interpret(t._expr, context); + context << ")"; + return context; + } + }; + } template - auto min(T&& t) -> typename vendor::min_t::type> - { - return { std::forward(t) }; - } + auto min(T&& t) -> typename vendor::min_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/multi_column.h b/include/sqlpp11/multi_column.h index a4abd36e..a1b69a44 100644 --- a/include/sqlpp11/multi_column.h +++ b/include/sqlpp11/multi_column.h @@ -55,23 +55,26 @@ namespace sqlpp std::tuple _columns; }; - template - struct vendor::interpreter_t> - { - using T = multi_column_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - interpret_tuple(t._columns, ',', context); - return context; - } - }; + using T = multi_column_t; + + static Context& _(const T& t, Context& context) + { + interpret_tuple(t._columns, ',', context); + return context; + } + }; + } namespace detail { template using make_multi_column_t = - multi_column_t::type, decltype(make_expression_tuple(std::declval()...))>; + multi_column_t::type, decltype(make_expression_tuple(std::declval()...))>; } template diff --git a/include/sqlpp11/on.h b/include/sqlpp11/on.h index bf6beeb7..9c957dd9 100644 --- a/include/sqlpp11/on.h +++ b/include/sqlpp11/on.h @@ -54,24 +54,27 @@ namespace sqlpp vendor::interpretable_list_t _dynamic_expressions; }; - template - struct vendor::interpreter_t> - { - using T = on_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - if (sizeof...(Expr) == 0 and t._dynamic_expressions.empty()) - return context; - context << " ON "; - interpret_tuple(t._expressions, " AND ", context); - if (sizeof...(Expr) and not t._dynamic_expressions.empty()) - context << " AND "; - interpret_list(t._dynamic_expressions, " AND ", context); - return context; - } - }; + using T = on_t; + static Context& _(const T& t, Context& context) + { + if (sizeof...(Expr) == 0 and t._dynamic_expressions.empty()) + return context; + context << " ON "; + interpret_tuple(t._expressions, " AND ", context); + if (sizeof...(Expr) and not t._dynamic_expressions.empty()) + context << " AND "; + interpret_list(t._dynamic_expressions, " AND ", context); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/parameter.h b/include/sqlpp11/parameter.h index 6cb9730c..36542f54 100644 --- a/include/sqlpp11/parameter.h +++ b/include/sqlpp11/parameter.h @@ -49,17 +49,20 @@ namespace sqlpp ~parameter_t() = default; }; - template - struct vendor::interpreter_t> - { - using T = parameter_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "?"; - return context; - } - }; + using T = parameter_t; + + static Context& _(const T& t, Context& context) + { + context << "?"; + return context; + } + }; + } template auto parameter(NamedExpr&& namedExpr) diff --git a/include/sqlpp11/remove.h b/include/sqlpp11/remove.h index 2d5d7566..be1f099c 100644 --- a/include/sqlpp11/remove.h +++ b/include/sqlpp11/remove.h @@ -165,20 +165,23 @@ namespace sqlpp Where _where; }; - template - struct vendor::interpreter_t> - { - using T = remove_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "DELETE FROM "; - interpret(t._table, context); - interpret(t._using, context); - interpret(t._where, context); - return context; - } - }; + using T = remove_t; + + static Context& _(const T& t, Context& context) + { + context << "DELETE FROM "; + interpret(t._table, context); + interpret(t._using, context); + interpret(t._where, context); + return context; + } + }; + } template constexpr remove_t::type> remove_from(Table&& table) diff --git a/include/sqlpp11/select.h b/include/sqlpp11/select.h index 9c00882d..bb746d38 100644 --- a/include/sqlpp11/select.h +++ b/include/sqlpp11/select.h @@ -606,42 +606,44 @@ namespace sqlpp Offset _offset; }; - template - struct vendor::interpreter_t> - { - using T = select_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { + using T = select_t; + + static Context& _(const T& t, Context& context) + { context << "SELECT "; interpret(t._flags, context); @@ -655,8 +657,9 @@ namespace sqlpp interpret(t._offset, context); return context; - } - }; + } + }; + } // construct select flag list @@ -664,7 +667,7 @@ namespace sqlpp { template using make_select_flag_list_t = - vendor::select_flag_list_t()...))>; + vendor::select_flag_list_t()...))>; } // construct select expression list @@ -672,7 +675,7 @@ namespace sqlpp { template using make_select_expression_list_t = - vendor::select_expression_list_t()...))>; + vendor::select_expression_list_t()...))>; } template @@ -681,7 +684,7 @@ namespace sqlpp { return { { detail::make_flag_tuple(std::forward(namedExpr)...) }, - { detail::make_expression_tuple(std::forward(namedExpr)...) } + { detail::make_expression_tuple(std::forward(namedExpr)...) } }; } template @@ -690,7 +693,7 @@ namespace sqlpp { return { { detail::make_flag_tuple(std::forward(namedExpr)...) }, - { detail::make_expression_tuple(std::forward(namedExpr)...) } + { detail::make_expression_tuple(std::forward(namedExpr)...) } }; } diff --git a/include/sqlpp11/some.h b/include/sqlpp11/some.h index 5a1a19c8..44c7a85e 100644 --- a/include/sqlpp11/some.h +++ b/include/sqlpp11/some.h @@ -75,25 +75,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::some_t; + + static Context& _(const T& t, Context& context) + { + context << "SOME("; + interpret(t._select, context); + context << ")"; + return context; + } + }; + } template - auto some(T&& t) -> typename vendor::some_t::type> - { - return { std::forward(t) }; - } + auto some(T&& t) -> typename vendor::some_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/sort_order.h b/include/sqlpp11/sort_order.h index d2e11c66..1404223c 100644 --- a/include/sqlpp11/sort_order.h +++ b/include/sqlpp11/sort_order.h @@ -43,27 +43,30 @@ namespace sqlpp Expression _expression; }; - template - struct vendor::interpreter_t> - { - using T = sort_order_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - interpret(t._expression, context); - switch(SortType) - { - case sort_type::asc: - context << " ASC"; - break; - default: - context << " DESC"; - break; - } - return context; - } - }; + using T = sort_order_t; + static Context& _(const T& t, Context& context) + { + interpret(t._expression, context); + switch(SortType) + { + case sort_type::asc: + context << " ASC"; + break; + default: + context << " DESC"; + break; + } + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/sum.h b/include/sqlpp11/sum.h index 56a20ddd..e3d72ea1 100644 --- a/include/sqlpp11/sum.h +++ b/include/sqlpp11/sum.h @@ -74,25 +74,28 @@ namespace sqlpp }; } - template - struct vendor::interpreter_t> - { - using T = vendor::sum_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - context << "SUM("; - interpret(t._expr, context); - context << ")"; - return context; - } - }; + using T = vendor::sum_t; + + static Context& _(const T& t, Context& context) + { + context << "SUM("; + interpret(t._expr, context); + context << ")"; + return context; + } + }; + } template - auto sum(T&& t) -> typename vendor::sum_t::type> - { - return { std::forward(t) }; - } + auto sum(T&& t) -> typename vendor::sum_t::type> + { + return { std::forward(t) }; + } } diff --git a/include/sqlpp11/table.h b/include/sqlpp11/table.h index 0e502981..ed07292e 100644 --- a/include/sqlpp11/table.h +++ b/include/sqlpp11/table.h @@ -99,19 +99,22 @@ namespace sqlpp return {}; } - template - struct vendor::interpreter_t::value and not is_pseudo_table_t::value, void>::type> - { - using T = X; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t::value and not is_pseudo_table_t::value, void>::type> { - context << T::_name_t::_get_name(); - return context; - } - }; + using T = X; + + static Context& _(const T& t, Context& context) + { + context << T::_name_t::_get_name(); + return context; + } + }; + } } #endif diff --git a/include/sqlpp11/table_alias.h b/include/sqlpp11/table_alias.h index 0588c6a5..2fa87c45 100644 --- a/include/sqlpp11/table_alias.h +++ b/include/sqlpp11/table_alias.h @@ -61,20 +61,23 @@ namespace sqlpp Table _table; }; - template - struct vendor::interpreter_t::value, void>::type> - { - using T = X; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t::value, void>::type> { - context << "("; - interpret(t._table, context); - context << ") AS " << T::_name_t::_get_name(); - return context; - } - }; + using T = X; + static Context& _(const T& t, Context& context) + { + context << "("; + interpret(t._table, context); + context << ") AS " << T::_name_t::_get_name(); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/tvin.h b/include/sqlpp11/tvin.h index 91eff115..f3c43f94 100644 --- a/include/sqlpp11/tvin.h +++ b/include/sqlpp11/tvin.h @@ -53,16 +53,19 @@ namespace sqlpp _operand_t _value; }; - template - struct vendor::interpreter_t> - { - using T = tvin_t; - - static void _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - static_assert(detail::wrong::value, "tvin() must not be used with anything but =, ==, != and !"); - } - }; + using T = tvin_t; + + static void _(const T& t, Context& context) + { + static_assert(detail::wrong::value, "tvin() must not be used with anything but =, ==, != and !"); + } + }; + } template struct tvin_wrap_t @@ -104,31 +107,33 @@ namespace sqlpp typename tvin_t::_operand_t _value; }; - template - struct vendor::interpreter_t> - { - using T = tvin_wrap_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - if (t._is_trivial()) - { - context << "NULL"; - } - else - { - interpret(t._value, context); - } - return context; - } - }; + using T = tvin_wrap_t; + static Context& _(const T& t, Context& context) + { + if (t._is_trivial()) + { + context << "NULL"; + } + else + { + interpret(t._value, context); + } + return context; + } + }; + } template - auto tvin(T t) -> tvin_t::type> - { - return {t}; - } + auto tvin(T t) -> tvin_t::type> + { + return {t}; + } } diff --git a/include/sqlpp11/update.h b/include/sqlpp11/update.h index f8234640..3bc0cd7c 100644 --- a/include/sqlpp11/update.h +++ b/include/sqlpp11/update.h @@ -167,25 +167,28 @@ namespace sqlpp Where _where; }; - template - struct vendor::interpreter_t> - { - using T = update_t; + namespace vendor + { + template + struct interpreter_t> + { + using T = update_t; - static Context& _(const T& t, Context& context) - { - context << "UPDATE "; - interpret(t._table, context); - interpret(t._assignments, context); - interpret(t._where, context); - return context; - } - }; + static Context& _(const T& t, Context& context) + { + context << "UPDATE "; + interpret(t._table, context); + interpret(t._assignments, context); + interpret(t._where, context); + return context; + } + }; + } template constexpr update_t::type> update(Table&& table) diff --git a/include/sqlpp11/vendor/select_flag_list.h b/include/sqlpp11/vendor/select_flag_list.h index 63508674..62630b88 100644 --- a/include/sqlpp11/vendor/select_flag_list.h +++ b/include/sqlpp11/vendor/select_flag_list.h @@ -45,15 +45,18 @@ namespace sqlpp }; static constexpr all_t all = {}; - template - struct vendor::interpreter_t - { - static Context& _(const all_t&, Context& context) + namespace vendor + { + template + struct interpreter_t { - context << "ALL"; - return context; - } - }; + static Context& _(const all_t&, Context& context) + { + context << "ALL"; + return context; + } + }; + } struct distinct_t { @@ -64,15 +67,18 @@ namespace sqlpp }; static constexpr distinct_t distinct = {}; - template - struct vendor::interpreter_t - { - static Context& _(const distinct_t&, Context& context) + namespace vendor + { + template + struct interpreter_t { - context << "DISTINCT"; - return context; - } - }; + static Context& _(const distinct_t&, Context& context) + { + context << "DISTINCT"; + return context; + } + }; + } struct straight_join_t { @@ -83,15 +89,18 @@ namespace sqlpp }; static constexpr straight_join_t straight_join = {}; - template - struct vendor::interpreter_t - { - static Context& _(const straight_join_t&, Context& context) + namespace vendor + { + template + struct interpreter_t { - context << "STRAIGHT_JOIN"; - return context; - } - }; + static Context& _(const straight_join_t&, Context& context) + { + context << "STRAIGHT_JOIN"; + return context; + } + }; + } namespace vendor { diff --git a/include/sqlpp11/vendor/select_pseudo_table.h b/include/sqlpp11/vendor/select_pseudo_table.h index 7c388699..24492f78 100644 --- a/include/sqlpp11/vendor/select_pseudo_table.h +++ b/include/sqlpp11/vendor/select_pseudo_table.h @@ -70,18 +70,21 @@ namespace sqlpp Select _select; }; - template - struct vendor::interpreter_t> - { - using T = select_pseudo_table_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t> { - interpret(t._select, context); - return context; - } - }; - + using T = select_pseudo_table_t; + + static Context& _(const T& t, Context& context) + { + interpret(t._select, context); + return context; + } + }; + + } } #endif diff --git a/include/sqlpp11/verbatim_table.h b/include/sqlpp11/verbatim_table.h index f5c47182..d394720c 100644 --- a/include/sqlpp11/verbatim_table.h +++ b/include/sqlpp11/verbatim_table.h @@ -65,17 +65,20 @@ namespace sqlpp std::string _name; }; - template - struct vendor::interpreter_t - { - using T = verbatim_table_t; - - static Context& _(const T& t, Context& context) + namespace vendor + { + template + struct interpreter_t { - context << t._name; - return context; - } - }; + using T = verbatim_table_t; + + static Context& _(const T& t, Context& context) + { + context << t._name; + return context; + } + }; + } verbatim_table_t verbatim_table(std::string name)