mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-04 12:10:43 -06:00
Friendlier error messages for some case-expressions
This commit is contained in:
@@ -55,7 +55,7 @@ namespace sqlpp
|
||||
struct case_t
|
||||
: public expression_operators<
|
||||
case_t<When, Then, Else>,
|
||||
typename std::conditional<is_sql_null_t<Then>::value, value_type_of<When>, value_type_of<Then>>::type>,
|
||||
typename std::conditional<is_sql_null_t<Then>::value, value_type_of<Else>, value_type_of<Then>>::type>,
|
||||
public alias_operators<case_t<When, Then, Else>>
|
||||
{
|
||||
using _traits = make_traits<value_type_of<Then>, tag::is_expression>;
|
||||
|
||||
@@ -35,7 +35,8 @@ namespace sqlpp
|
||||
{
|
||||
struct no_value_t
|
||||
{
|
||||
using _traits = make_traits<void>;
|
||||
using _traits = make_traits<no_value_t>;
|
||||
using _cpp_value_type = void;
|
||||
};
|
||||
|
||||
template <typename Base>
|
||||
|
||||
@@ -38,12 +38,13 @@
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
struct no_value_t;
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, typename Enable = void>
|
||||
struct value_type_of_impl
|
||||
{
|
||||
static_assert(wrong_t<value_type_of_impl>::value, "Attempting to obtain value type from type without value_type");
|
||||
using type = no_value_t;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user