mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Added support for g++-4.8
This commit is contained in:
parent
e95294d044
commit
4ea28cac4b
@ -78,11 +78,14 @@ db.run(remove_from(foo).where(not foo.hasFun));
|
||||
|
||||
Requirements:
|
||||
-------------
|
||||
sqlpp11 makes heavy use of C++11. It has been developed using
|
||||
__Compiler:__
|
||||
sqlpp11 makes heavy use of C++11 and requires a recent compiler and STL. The following compilers are known to compile the test programs:
|
||||
|
||||
clang-3.2 on Ubuntu-10.4 with matching libc++
|
||||
* clang-3.2 on Ubuntu-12.4
|
||||
* g++-4.8 on Ubuntu-12.4
|
||||
|
||||
It also requires a database library with a matching interface, see database/api.h
|
||||
__Database Connector:__
|
||||
sqlpp11 requires a certain api in order to connect with the database, see database/api.h.
|
||||
|
||||
Links to sample implementations will follow soon.
|
||||
|
||||
|
@ -65,7 +65,7 @@ namespace sqlpp
|
||||
static_assert(std::is_same<Assignments, noop>::value, "cannot call set() twice");
|
||||
return {
|
||||
_table,
|
||||
{std::forward<Assignment>(assignment)...},
|
||||
{std::tuple<typename std::decay<Assignment>::type...>{std::forward<Assignment>(assignment)...}},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace sqlpp
|
||||
template<typename AliasProvider, typename... NamedExpr>
|
||||
detail::make_multi_column_t<AliasProvider, NamedExpr...> multi_column(AliasProvider&& aliasProvider, NamedExpr&&... namedExpr)
|
||||
{
|
||||
return { {std::forward<NamedExpr>(namedExpr)...}};
|
||||
return { decltype(make_expression_tuple(std::declval<NamedExpr>()...)){std::forward<NamedExpr>(namedExpr)...}};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ namespace sqlpp
|
||||
static_assert(std::is_same<Where, noop>::value, "cannot call using() after where()");
|
||||
return {
|
||||
_table,
|
||||
{{std::forward<Tab>(tab)...}},
|
||||
{std::tuple<typename std::decay<Tab>::type...>{std::forward<Tab>(tab)...}},
|
||||
_where
|
||||
};
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ namespace sqlpp
|
||||
using add_limit_t = select_t<Flags, ExpressionList, From, Where, GroupBy, Having, OrderBy, limit_t, Offset>;
|
||||
using add_offset_t = select_t<Flags, ExpressionList, From, Where, GroupBy, Having, OrderBy, Limit, offset_t>;
|
||||
|
||||
using result_row_t = result_row_t<NamedExpr...>;
|
||||
using _result_row_t = result_row_t<NamedExpr...>;
|
||||
|
||||
// Indicators
|
||||
using _value_type = typename std::conditional<
|
||||
@ -218,7 +218,7 @@ namespace sqlpp
|
||||
return {
|
||||
_flags,
|
||||
_expression_list,
|
||||
{{std::forward<Table>(table)...}},
|
||||
{std::tuple<typename std::decay<Table>::type...>{std::forward<Table>(table)...}},
|
||||
_where,
|
||||
_group_by,
|
||||
_having,
|
||||
@ -256,7 +256,7 @@ namespace sqlpp
|
||||
_expression_list,
|
||||
_from,
|
||||
_where,
|
||||
{{std::forward<Col>(column)...}},
|
||||
{std::tuple<typename std::decay<Col>::type...>{std::forward<Col>(column)...}},
|
||||
_having,
|
||||
_order_by,
|
||||
_limit,
|
||||
@ -294,7 +294,7 @@ namespace sqlpp
|
||||
_where,
|
||||
_group_by,
|
||||
_having,
|
||||
{{std::forward<OrderExpr>(expr)...}},
|
||||
{std::tuple<typename std::decay<OrderExpr>::type...>{std::forward<OrderExpr>(expr)...}},
|
||||
_limit,
|
||||
_offset
|
||||
};
|
||||
@ -383,7 +383,7 @@ namespace sqlpp
|
||||
|
||||
// Execute
|
||||
template<typename Db>
|
||||
result_t<Db, result_row_t> run(Db& db) const
|
||||
result_t<Db, _result_row_t> run(Db& db) const
|
||||
{
|
||||
static_assert(not is_noop<ExpressionList>::value, "cannot run select without having selected anything");
|
||||
static_assert(is_from_t<From>::value, "cannot run select without a from()");
|
||||
|
@ -64,7 +64,7 @@ namespace sqlpp
|
||||
static_assert(std::is_same<Assignments, noop>::value, "cannot call set() twice");
|
||||
return {
|
||||
_table,
|
||||
{{std::forward<Assignment>(assignment)...}},
|
||||
{std::tuple<typename std::decay<Assignment>::type...>{std::forward<Assignment>(assignment)...}},
|
||||
_where,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user