Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
Adjusted to failure return types of sqlpp11
Browse files Browse the repository at this point in the history
  • Loading branch information
rbock committed Sep 3, 2016
1 parent b6860ce commit f2cd303
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions include/sqlpp11/sqlite3/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,17 @@ namespace sqlpp

//! call run on the argument
template <typename T>
auto _run(const T& t, const std::true_type&) -> decltype(t._run(*this))
auto _run(const T& t, ::sqlpp::consistent_t) -> decltype(t._run(*this))
{
return t._run(*this);
}

template <typename T>
auto _run(const T& t, const std::false_type&) -> void;
template <typename Check, typename T>
auto _run(const T& t, Check) -> Check;

template <typename T>
auto operator()(const T& t)
-> decltype(this->_run(t, typename sqlpp::run_check_t<_serializer_context_t, T>::type{}))
auto operator()(const T& t) -> decltype(this->_run(t, sqlpp::run_check_t<_serializer_context_t, T>{}))
{
sqlpp::run_check_t<_serializer_context_t, T>::_();
return _run(t, sqlpp::run_check_t<_serializer_context_t, T>{});
}

Expand Down

0 comments on commit f2cd303

Please sign in to comment.