Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 28, 2024
1 parent 9eeae42 commit a9f25ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/tao/pq/row.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ namespace tao::pq
[[nodiscard]] auto as() const -> T
{
if( result_traits_size< T > != m_columns ) {
const auto type = internal::demangle< T >();
throw std::out_of_range( std::format( "datatype '{}' requires {} columns, but row/slice has {} columns", type, result_traits_size< T >, m_columns ) );
throw std::out_of_range( std::format( "datatype '{}' requires {} columns, but row/slice has {} columns", internal::demangle< T >(), result_traits_size< T >, m_columns ) );
}
return get< T >( 0 );
}
Expand Down
3 changes: 1 addition & 2 deletions include/tao/pq/table_row.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ namespace tao::pq
[[nodiscard]] auto as() const -> T
{
if( result_traits_size< T > != m_columns ) {
const auto type = internal::demangle< T >();
throw std::out_of_range( std::format( "datatype '{}' requires {} columns, but table_row/slice has {} columns", type, result_traits_size< T >, m_columns ) );
throw std::out_of_range( std::format( "datatype '{}' requires {} columns, but table_row/slice has {} columns", internal::demangle< T >(), result_traits_size< T >, m_columns ) );
}
return get< T >( 0 );
}
Expand Down

0 comments on commit a9f25ac

Please sign in to comment.