Skip to content

Commit

Permalink
Use invoke_result_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed Feb 19, 2020
1 parent 8f2915b commit afd43cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/pqxx/transactor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "pqxx/internal/compiler-internal-pre.hxx"

#include <functional>
#include <type_traits>

#include "pqxx/connection.hxx"
#include "pqxx/transaction.hxx"
Expand Down Expand Up @@ -97,7 +98,7 @@ namespace pqxx
*/
template<typename TRANSACTION_CALLBACK>
inline auto perform(TRANSACTION_CALLBACK &&callback, int attempts = 3)
-> decltype(std::invoke(callback))
-> std::invoke_result_t<TRANSACTION_CALLBACK>
{
if (attempts <= 0)
throw std::invalid_argument{
Expand Down

0 comments on commit afd43cf

Please sign in to comment.