0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Make g++-4.8 compile again

This commit is contained in:
rbock 2014-01-18 16:10:46 +01:00
parent 312e735d6d
commit 87302fa27f
26 changed files with 528 additions and 439 deletions

View File

@ -45,8 +45,10 @@ namespace sqlpp
Expression _expression;
};
namespace vendor
{
template<typename Context, typename Expression, typename AliasProvider>
struct vendor::interpreter_t<Context, expression_alias_t<Expression, AliasProvider>>
struct interpreter_t<Context, expression_alias_t<Expression, AliasProvider>>
{
using T = expression_alias_t<Expression, AliasProvider>;
@ -60,6 +62,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -75,8 +75,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Select>
struct vendor::interpreter_t<Context, vendor::any_t<Select>>
struct interpreter_t<Context, vendor::any_t<Select>>
{
using T = vendor::any_t<Select>;
@ -95,6 +97,7 @@ namespace sqlpp
return { std::forward<T>(t) };
}
}
}
#endif

View File

@ -74,8 +74,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Expr>
struct vendor::interpreter_t<Context, vendor::avg_t<Expr>>
struct interpreter_t<Context, vendor::avg_t<Expr>>
{
using T = vendor::avg_t<Expr>;
@ -87,6 +89,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto avg(T&& t) -> typename vendor::avg_t<typename operand_t<T, is_value_t>::type>

View File

@ -78,8 +78,10 @@ namespace sqlpp
}
};
namespace vendor
{
template<typename Context, typename... Args>
struct vendor::interpreter_t<Context, column_t<Args...>>
struct interpreter_t<Context, column_t<Args...>>
{
using T = column_t<Args...>;
@ -90,6 +92,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -74,8 +74,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Expr>
struct vendor::interpreter_t<Context, vendor::count_t<Expr>>
struct interpreter_t<Context, vendor::count_t<Expr>>
{
using T = vendor::count_t<Expr>;
@ -87,6 +89,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto count(T&& t) -> typename vendor::count_t<typename operand_t<T, is_value_t>::type>

View File

@ -73,8 +73,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Select>
struct vendor::interpreter_t<Context, vendor::exists_t<Select>>
struct interpreter_t<Context, vendor::exists_t<Select>>
{
using T = vendor::exists_t<Select>;
@ -86,6 +88,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>

View File

@ -67,8 +67,10 @@ namespace sqlpp
std::string _verbatim;
};
namespace vendor
{
template<typename Context, typename ValueType>
struct vendor::interpreter_t<Context, verbatim_t<ValueType>>
struct interpreter_t<Context, verbatim_t<ValueType>>
{
using T = verbatim_t<ValueType>;
@ -78,6 +80,7 @@ namespace sqlpp
return context;
}
};
}
template<typename ValueType, typename StringType>
auto verbatim(StringType&& s) -> verbatim_t<ValueType>
@ -103,8 +106,10 @@ namespace sqlpp
_container_t _container;
};
namespace vendor
{
template<typename Context, typename Container>
struct vendor::interpreter_t<Context, value_list_t<Container>>
struct interpreter_t<Context, value_list_t<Container>>
{
using T = value_list_t<Container>;
@ -123,6 +128,7 @@ namespace sqlpp
return context;
}
};
}
template<typename Container>
auto value_list(Container&& c) -> value_list_t<typename std::decay<Container>::type>

View File

@ -133,8 +133,10 @@ namespace sqlpp
InsertList _insert_list;
};
namespace vendor
{
template<typename Context, typename Database, typename Table, typename InsertList>
struct vendor::interpreter_t<Context, insert_t<Database, Table, InsertList>>
struct interpreter_t<Context, insert_t<Database, Table, InsertList>>
{
using T = insert_t<Database, Table, InsertList>;
@ -146,6 +148,7 @@ namespace sqlpp
return context;
}
};
}
template<typename Table>
insert_t<void, typename std::decay<Table>::type> insert_into(Table&& table)

View File

@ -141,8 +141,10 @@ namespace sqlpp
};
// FIXME: Need to check if db supports the join type. e.g. sqlite does not support right outer or full outer join
namespace vendor
{
template<typename Context, typename JoinType, typename Lhs, typename Rhs, typename On>
struct vendor::interpreter_t<Context, join_t<JoinType, Lhs, Rhs, On>>
struct interpreter_t<Context, join_t<JoinType, Lhs, Rhs, On>>
{
using T = join_t<JoinType, Lhs, Rhs, On>;
@ -159,6 +161,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -74,8 +74,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Expr>
struct vendor::interpreter_t<Context, vendor::max_t<Expr>>
struct interpreter_t<Context, vendor::max_t<Expr>>
{
using T = vendor::max_t<Expr>;
@ -87,6 +89,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto max(T&& t) -> typename vendor::max_t<typename operand_t<T, is_value_t>::type>

View File

@ -74,8 +74,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Expr>
struct vendor::interpreter_t<Context, vendor::min_t<Expr>>
struct interpreter_t<Context, vendor::min_t<Expr>>
{
using T = vendor::min_t<Expr>;
@ -87,6 +89,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto min(T&& t) -> typename vendor::min_t<typename operand_t<T, is_value_t>::type>

View File

@ -55,8 +55,10 @@ namespace sqlpp
std::tuple<NamedExpr...> _columns;
};
namespace vendor
{
template<typename Context, typename AliasProvider, typename... NamedExpr>
struct vendor::interpreter_t<Context, multi_column_t<AliasProvider, NamedExpr...>>
struct interpreter_t<Context, multi_column_t<AliasProvider, NamedExpr...>>
{
using T = multi_column_t<AliasProvider, NamedExpr...>;
@ -66,6 +68,7 @@ namespace sqlpp
return context;
}
};
}
namespace detail
{

View File

@ -54,8 +54,10 @@ namespace sqlpp
vendor::interpretable_list_t<Database> _dynamic_expressions;
};
namespace vendor
{
template<typename Context, typename Database, typename... Expr>
struct vendor::interpreter_t<Context, on_t<Database, Expr...>>
struct interpreter_t<Context, on_t<Database, Expr...>>
{
using T = on_t<Database, Expr...>;
@ -72,6 +74,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -49,8 +49,10 @@ namespace sqlpp
~parameter_t() = default;
};
namespace vendor
{
template<typename Context, typename ValueType, typename NameType>
struct vendor::interpreter_t<Context, parameter_t<ValueType, NameType>>
struct interpreter_t<Context, parameter_t<ValueType, NameType>>
{
using T = parameter_t<ValueType, NameType>;
@ -60,6 +62,7 @@ namespace sqlpp
return context;
}
};
}
template<typename NamedExpr>
auto parameter(NamedExpr&& namedExpr)

View File

@ -165,8 +165,10 @@ namespace sqlpp
Where _where;
};
namespace vendor
{
template<typename Context, typename Database, typename Table, typename Using, typename Where>
struct vendor::interpreter_t<Context, remove_t<Database, Table, Using, Where>>
struct interpreter_t<Context, remove_t<Database, Table, Using, Where>>
{
using T = remove_t<Database, Table, Using, Where>;
@ -179,6 +181,7 @@ namespace sqlpp
return context;
}
};
}
template<typename Table>
constexpr remove_t<void, typename std::decay<Table>::type> remove_from(Table&& table)

View File

@ -606,6 +606,8 @@ namespace sqlpp
Offset _offset;
};
namespace vendor
{
template<typename Context,
typename Database,
typename Flags,
@ -618,7 +620,7 @@ namespace sqlpp
typename Limit,
typename Offset
>
struct vendor::interpreter_t<Context, select_t<Database,
struct interpreter_t<Context, select_t<Database,
Flags,
ExpressionList,
From,
@ -657,6 +659,7 @@ namespace sqlpp
return context;
}
};
}
// construct select flag list

View File

@ -75,8 +75,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Select>
struct vendor::interpreter_t<Context, vendor::some_t<Select>>
struct interpreter_t<Context, vendor::some_t<Select>>
{
using T = vendor::some_t<Select>;
@ -88,6 +90,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto some(T&& t) -> typename vendor::some_t<typename operand_t<T, is_select_t>::type>

View File

@ -43,8 +43,10 @@ namespace sqlpp
Expression _expression;
};
namespace vendor
{
template<typename Context, typename Expression, sort_type SortType>
struct vendor::interpreter_t<Context, sort_order_t<Expression, SortType>>
struct interpreter_t<Context, sort_order_t<Expression, SortType>>
{
using T = sort_order_t<Expression, SortType>;
@ -64,6 +66,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -74,8 +74,10 @@ namespace sqlpp
};
}
namespace vendor
{
template<typename Context, typename Expr>
struct vendor::interpreter_t<Context, vendor::sum_t<Expr>>
struct interpreter_t<Context, vendor::sum_t<Expr>>
{
using T = vendor::sum_t<Expr>;
@ -87,6 +89,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto sum(T&& t) -> typename vendor::sum_t<typename operand_t<T, is_value_t>::type>

View File

@ -99,8 +99,10 @@ namespace sqlpp
return {};
}
namespace vendor
{
template<typename Context, typename X>
struct vendor::interpreter_t<Context, X, typename std::enable_if<std::is_base_of<table_base_t, X>::value and not is_pseudo_table_t<X>::value, void>::type>
struct interpreter_t<Context, X, typename std::enable_if<std::is_base_of<table_base_t, X>::value and not is_pseudo_table_t<X>::value, void>::type>
{
using T = X;
@ -112,6 +114,7 @@ namespace sqlpp
};
}
}
#endif

View File

@ -61,8 +61,10 @@ namespace sqlpp
Table _table;
};
namespace vendor
{
template<typename Context, typename X>
struct vendor::interpreter_t<Context, X, typename std::enable_if<std::is_base_of<table_alias_base_t, X>::value, void>::type>
struct interpreter_t<Context, X, typename std::enable_if<std::is_base_of<table_alias_base_t, X>::value, void>::type>
{
using T = X;
@ -75,6 +77,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -53,8 +53,10 @@ namespace sqlpp
_operand_t _value;
};
namespace vendor
{
template<typename Context, typename Type>
struct vendor::interpreter_t<Context, tvin_t<Type>>
struct interpreter_t<Context, tvin_t<Type>>
{
using T = tvin_t<Type>;
@ -63,6 +65,7 @@ namespace sqlpp
static_assert(detail::wrong<T>::value, "tvin() must not be used with anything but =, ==, != and !");
}
};
}
template<typename T>
struct tvin_wrap_t
@ -104,8 +107,10 @@ namespace sqlpp
typename tvin_t<T>::_operand_t _value;
};
namespace vendor
{
template<typename Context, typename Type>
struct vendor::interpreter_t<Context, tvin_wrap_t<Type>>
struct interpreter_t<Context, tvin_wrap_t<Type>>
{
using T = tvin_wrap_t<Type>;
@ -122,7 +127,7 @@ namespace sqlpp
return context;
}
};
}
template<typename T>
auto tvin(T t) -> tvin_t<typename std::decay<T>::type>

View File

@ -167,13 +167,15 @@ namespace sqlpp
Where _where;
};
namespace vendor
{
template<typename Context,
typename Database,
typename Table,
typename Assignments,
typename Where
>
struct vendor::interpreter_t<Context, update_t<Database, Table, Assignments, Where>>
struct interpreter_t<Context, update_t<Database, Table, Assignments, Where>>
{
using T = update_t<Database, Table, Assignments, Where>;
@ -186,6 +188,7 @@ namespace sqlpp
return context;
}
};
}
template<typename Table>
constexpr update_t<void, typename std::decay<Table>::type> update(Table&& table)

View File

@ -45,8 +45,10 @@ namespace sqlpp
};
static constexpr all_t all = {};
namespace vendor
{
template<typename Context>
struct vendor::interpreter_t<Context, all_t>
struct interpreter_t<Context, all_t>
{
static Context& _(const all_t&, Context& context)
{
@ -54,6 +56,7 @@ namespace sqlpp
return context;
}
};
}
struct distinct_t
{
@ -64,8 +67,10 @@ namespace sqlpp
};
static constexpr distinct_t distinct = {};
namespace vendor
{
template<typename Context>
struct vendor::interpreter_t<Context, distinct_t>
struct interpreter_t<Context, distinct_t>
{
static Context& _(const distinct_t&, Context& context)
{
@ -73,6 +78,7 @@ namespace sqlpp
return context;
}
};
}
struct straight_join_t
{
@ -83,8 +89,10 @@ namespace sqlpp
};
static constexpr straight_join_t straight_join = {};
namespace vendor
{
template<typename Context>
struct vendor::interpreter_t<Context, straight_join_t>
struct interpreter_t<Context, straight_join_t>
{
static Context& _(const straight_join_t&, Context& context)
{
@ -92,6 +100,7 @@ namespace sqlpp
return context;
}
};
}
namespace vendor
{

View File

@ -70,8 +70,10 @@ namespace sqlpp
Select _select;
};
namespace vendor
{
template<typename Context, typename Select, typename... NamedExpr>
struct vendor::interpreter_t<Context, select_pseudo_table_t<Select, NamedExpr...>>
struct interpreter_t<Context, select_pseudo_table_t<Select, NamedExpr...>>
{
using T = select_pseudo_table_t<Select, NamedExpr...>;
@ -82,6 +84,7 @@ namespace sqlpp
}
};
}
}
#endif

View File

@ -65,8 +65,10 @@ namespace sqlpp
std::string _name;
};
namespace vendor
{
template<typename Context>
struct vendor::interpreter_t<Context, verbatim_table_t>
struct interpreter_t<Context, verbatim_table_t>
{
using T = verbatim_table_t;
@ -76,6 +78,7 @@ namespace sqlpp
return context;
}
};
}
verbatim_table_t verbatim_table(std::string name)