Skip to content

Commit

Permalink
Fix pqxx::internal::inner_type<> not drilling down past const/volat…
Browse files Browse the repository at this point in the history
…ile (prevented consts from being passed to `exec_params()` etc.) (#193)
  • Loading branch information
JadeMatrix authored and jtv committed Jun 14, 2019
1 parent 0757d0a commit 84da7cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/pqxx/internal/type_utils.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ namespace internal
template<typename... T> using void_t = void;

/// Extract the content type held by an `optional`-like wrapper type.
template<typename T> using inner_type = typename std::remove_reference<
decltype(*std::declval<T>())
/* Replace nested `std::remove_*`s with `std::remove_cvref` in C++20 */
template<typename T> using inner_type = typename std::remove_cv<
typename std::remove_reference<
decltype(*std::declval<T>())
>::type
>::type;

/// Does the given type have an `operator *()`?
Expand Down

0 comments on commit 84da7cf

Please sign in to comment.