Rewrote all_t to use bool arguments instead of predicate and classes

This commit is contained in:
rbock
2014-05-01 17:34:47 +02:00
parent 2452f224d4
commit 331353022a
17 changed files with 62 additions and 64 deletions

View File

@@ -134,14 +134,14 @@ namespace sqlpp
template<typename... T>
vendor::in_t<true, Base, vendor::wrap_operand_t<T>...> in(T... t) const
{
static_assert(detail::all_t<_is_valid_comparison_operand, vendor::wrap_operand_t<T>...>::value, "at least one operand of in() is not valid");
static_assert(detail::all_t<_is_valid_comparison_operand<vendor::wrap_operand_t<T>>::value...>::value, "at least one operand of in() is not valid");
return { *static_cast<const Base*>(this), vendor::wrap_operand_t<T>{t}... };
}
template<typename... T>
vendor::in_t<false, Base, vendor::wrap_operand_t<T>...> not_in(T... t) const
{
static_assert(detail::all_t<_is_valid_comparison_operand, vendor::wrap_operand_t<T>...>::value, "at least one operand of in() is not valid");
static_assert(detail::all_t<_is_valid_comparison_operand<vendor::wrap_operand_t<T>>::value...>::value, "at least one operand of in() is not valid");
return { *static_cast<const Base*>(this), vendor::wrap_operand_t<T>{t}... };
}