Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 15, 2024
1 parent 3d0e8b2 commit bbf1a29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
9 changes: 1 addition & 8 deletions include/tao/pq/result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ namespace tao::pq
class table_writer;
class transaction;

namespace internal
{
template< typename T >
concept has_reserve = requires( T t, typename T::size_type s ) { t.reserve( s ); };

} // namespace internal

class result final
{
private:
Expand Down Expand Up @@ -265,7 +258,7 @@ namespace tao::pq
[[nodiscard]] auto as_container() const -> T
{
T nrv;
if constexpr( internal::has_reserve< T > ) {
if constexpr( requires { nrv.reserve( size() ); } ) {
nrv.reserve( size() );
}
check_has_result_set();
Expand Down
11 changes: 0 additions & 11 deletions src/test/pq/has_reserve.cpp

This file was deleted.

0 comments on commit bbf1a29

Please sign in to comment.