Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Dec 22, 2024
1 parent 0b8d84f commit 9275b50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
10 changes: 7 additions & 3 deletions include/tao/pq/is_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ namespace tao::pq
template< typename T, std::size_t N >
inline constexpr bool is_array_parameter< std::array< T, N > > = true;

template< typename T >
inline constexpr bool is_array_result = pq::is_array< T >;

} // namespace internal

template< typename T >
inline constexpr bool is_array_parameter = internal::is_array_parameter< T >;

namespace internal
{
template< typename T >
inline constexpr bool is_array_result = pq::is_array< T >;

} // namespace internal

template< typename T >
inline constexpr bool is_array_result = internal::is_array_result< T >;

Expand Down
4 changes: 2 additions & 2 deletions include/tao/pq/parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ namespace tao::pq

friend class transaction_base;

template< typename T, std::size_t... Is >
void fill( const T& t, std::index_sequence< Is... > /*unused*/ )
template< std::size_t... Is >
void fill( const auto& t, std::index_sequence< Is... > /*unused*/ )
{
( ( m_types[ m_size + Is ] = static_cast< Oid >( t.template type< Is >() ) ), ... );
( ( m_values[ m_size + Is ] = t.template value< Is >() ), ... );
Expand Down
6 changes: 3 additions & 3 deletions include/tao/pq/parameter_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace tao::pq
{
template< typename T >
template< typename >
struct parameter_traits;

namespace internal
Expand All @@ -37,8 +37,8 @@ namespace tao::pq
// helper for table_writer
void table_writer_append( std::string& buffer, std::string_view data );

template< std::size_t N, typename T >
void snprintf( char ( &buffer )[ N ], const char* format, const T v ) noexcept
template< std::size_t N >
void snprintf( char ( &buffer )[ N ], const char* format, const auto v ) noexcept
{
static_assert( N >= 32 );
if( std::isfinite( v ) ) {
Expand Down

0 comments on commit 9275b50

Please sign in to comment.