Skip to content

Commit

Permalink
Include cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 15, 2024
1 parent 4bd56be commit 6dfc53b
Show file tree
Hide file tree
Showing 27 changed files with 37 additions and 19 deletions.
1 change: 1 addition & 0 deletions include/tao/pq/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define TAO_PQ_CONNECTION_HPP

#include <chrono>
#include <cstddef>
#include <functional>
#include <map>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/connection_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define TAO_PQ_CONNECTION_POOL_HPP

#include <chrono>
#include <functional>
#include <memory>
#include <optional>
#include <string>
Expand Down
1 change: 0 additions & 1 deletion include/tao/pq/field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <utility>

#include <tao/pq/null.hpp>
#include <tao/pq/result_traits.hpp>

namespace tao::pq
{
Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/internal/aggregate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef TAO_PQ_INTERNAL_AGGREGATE_HPP
#define TAO_PQ_INTERNAL_AGGREGATE_HPP

#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion include/tao/pq/internal/from_chars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <charconv>
#include <format>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>

#include <tao/pq/internal/demangle.hpp>
#include <tao/pq/internal/unreachable.hpp>
Expand Down
3 changes: 3 additions & 0 deletions include/tao/pq/internal/gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#ifndef TAO_PQ_INTERNAL_GEN_HPP
#define TAO_PQ_INTERNAL_GEN_HPP

#include <cstddef>
#include <utility>

#include <tao/pq/internal/exclusive_scan.hpp>

namespace tao::pq::internal
Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/internal/parameter_traits_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <charconv>
#include <cstddef>
#include <string>
#include <system_error>

#include <tao/pq/oid.hpp>

Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/internal/pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <atomic>
#include <cassert>
#include <cstddef>
#include <list>
#include <memory>
#include <mutex>
Expand Down
2 changes: 2 additions & 0 deletions include/tao/pq/large_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#ifndef TAO_PQ_LARGE_OBJECT_HPP
#define TAO_PQ_LARGE_OBJECT_HPP

#include <cstddef>
#include <cstdint>
#include <cstring>
#include <ios>
#include <memory>
#include <string>

#include <tao/pq/binary.hpp>
#include <tao/pq/oid.hpp>
Expand Down
1 change: 0 additions & 1 deletion include/tao/pq/parameter_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define TAO_PQ_PARAMETER_TRAITS_HPP

#include <cassert>
#include <charconv>
#include <cmath>
#include <cstddef>
#include <cstdio>
Expand Down
1 change: 0 additions & 1 deletion include/tao/pq/parameter_traits_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <list>
#include <set>
#include <string>
#include <type_traits>
#include <unordered_set>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions include/tao/pq/parameter_traits_optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#ifndef TAO_PQ_PARAMETER_TRAITS_OPTIONAL_HPP
#define TAO_PQ_PARAMETER_TRAITS_OPTIONAL_HPP

#include <cstddef>
#include <optional>
#include <string>
#include <type_traits>
#include <utility>

Expand Down
2 changes: 2 additions & 0 deletions include/tao/pq/parameter_traits_pair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef TAO_PQ_PARAMETER_TRAITS_PAIR_HPP
#define TAO_PQ_PARAMETER_TRAITS_PAIR_HPP

#include <cstddef>
#include <string>
#include <type_traits>
#include <utility>

Expand Down
2 changes: 2 additions & 0 deletions include/tao/pq/parameter_traits_tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef TAO_PQ_PARAMETER_TRAITS_TUPLE_HPP
#define TAO_PQ_PARAMETER_TRAITS_TUPLE_HPP

#include <cstddef>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
Expand Down
3 changes: 2 additions & 1 deletion include/tao/pq/result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef TAO_PQ_RESULT_HPP
#define TAO_PQ_RESULT_HPP

#include <cstddef>
#include <cstdint>
#include <format>
#include <iterator>
Expand Down Expand Up @@ -140,7 +141,7 @@ namespace tao::pq

friend void swap( const_iterator& lhs, const_iterator& rhs ) noexcept
{
return swap( static_cast< row& >( lhs ), static_cast< row& >( rhs ) );
swap( static_cast< row& >( lhs ), static_cast< row& >( rhs ) );
}

[[nodiscard]] friend auto operator+( const const_iterator& lhs, const difference_type rhs ) noexcept -> const_iterator
Expand Down
1 change: 0 additions & 1 deletion include/tao/pq/result_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <cstddef>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <utility>

Expand Down
6 changes: 6 additions & 0 deletions include/tao/pq/result_traits_aggregate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
#ifndef TAO_PQ_RESULT_TRAITS_AGGREGATE_HPP
#define TAO_PQ_RESULT_TRAITS_AGGREGATE_HPP

#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>

#include <tao/pq/internal/aggregate.hpp>
#include <tao/pq/internal/exclusive_scan.hpp>
#include <tao/pq/is_aggregate.hpp>
#include <tao/pq/result_traits.hpp>

Expand Down
5 changes: 1 addition & 4 deletions include/tao/pq/result_traits_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
#ifndef TAO_PQ_RESULT_TRAITS_ARRAY_HPP
#define TAO_PQ_RESULT_TRAITS_ARRAY_HPP

#include <array>
#include <cstddef>
#include <cstring>
#include <list>
#include <set>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <unordered_set>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -80,7 +77,7 @@ namespace tao::pq
}
else if( *value != '}' ) {
if( const auto* end = std::strpbrk( value, ",;}" ) ) {
std::string input( value, end );
const std::string input( value, end );
if( input == "NULL" ) {
if constexpr( requires { result_traits< value_type >::null(); } ) {
container.push_back( result_traits< value_type >::null() );
Expand Down
2 changes: 1 addition & 1 deletion include/tao/pq/result_traits_optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#ifndef TAO_PQ_RESULT_TRAITS_OPTIONAL_HPP
#define TAO_PQ_RESULT_TRAITS_OPTIONAL_HPP

#include <cstddef>
#include <optional>

#include <tao/pq/result_traits.hpp>
#include <tao/pq/row.hpp>

template< typename T >
struct tao::pq::result_traits< std::optional< T > >
Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/result_traits_pair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef TAO_PQ_RESULT_TRAITS_PAIR_HPP
#define TAO_PQ_RESULT_TRAITS_PAIR_HPP

#include <cstddef>
#include <type_traits>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/result_traits_tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef TAO_PQ_RESULT_TRAITS_TUPLE_HPP
#define TAO_PQ_RESULT_TRAITS_TUPLE_HPP

#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
Expand Down
5 changes: 3 additions & 2 deletions include/tao/pq/row.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace tao::pq

friend void swap( const_iterator& lhs, const_iterator& rhs ) noexcept
{
return swap( static_cast< field& >( lhs ), static_cast< field& >( rhs ) );
swap( static_cast< field& >( lhs ), static_cast< field& >( rhs ) );
}

[[nodiscard]] friend auto operator+( const const_iterator& lhs, const difference_type rhs ) noexcept -> const_iterator
Expand Down Expand Up @@ -249,7 +249,8 @@ namespace tao::pq
return get< T >( 0 );
}

template< typename T, typename = std::enable_if_t< is_aggregate_result< T > > >
template< typename T >
requires is_aggregate_result< T >
[[nodiscard]] operator T() const
{
return as< T >();
Expand Down
1 change: 0 additions & 1 deletion include/tao/pq/table_field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <utility>

#include <tao/pq/null.hpp>
#include <tao/pq/result_traits.hpp>

namespace tao::pq
{
Expand Down
4 changes: 2 additions & 2 deletions include/tao/pq/table_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#define TAO_PQ_TABLE_READER_HPP

#include <cassert>
#include <cstddef>
#include <cstdint>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <string_view>
#include <tuple>
#include <unordered_map>
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace tao::pq

friend void swap( const_iterator& lhs, const_iterator& rhs ) noexcept
{
return swap( static_cast< table_row& >( lhs ), static_cast< table_row& >( rhs ) );
swap( static_cast< table_row& >( lhs ), static_cast< table_row& >( rhs ) );
}

[[nodiscard]] friend auto operator==( const const_iterator& lhs, const const_iterator& rhs ) noexcept
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 @@ -12,7 +12,6 @@
#include <optional>
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <utility>

#include <tao/pq/internal/demangle.hpp>
Expand Down Expand Up @@ -126,7 +125,7 @@ namespace tao::pq

friend void swap( const_iterator& lhs, const_iterator& rhs ) noexcept
{
return swap( static_cast< table_field& >( lhs ), static_cast< table_field& >( rhs ) );
swap( static_cast< table_field& >( lhs ), static_cast< table_field& >( rhs ) );
}

[[nodiscard]] friend auto operator+( const const_iterator& lhs, const difference_type rhs ) noexcept -> const_iterator
Expand Down
1 change: 1 addition & 0 deletions include/tao/pq/table_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef TAO_PQ_TABLE_WRITER_HPP
#define TAO_PQ_TABLE_WRITER_HPP

#include <cstddef>
#include <memory>
#include <string>
#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion include/tao/pq/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <cstddef>
#include <cstdio>
#include <memory>
#include <string>
#include <string_view>
#if !defined( __cpp_pack_indexing ) && ( __cplusplus >= 202302L )
#include <tuple>
#endif
Expand Down

0 comments on commit 6dfc53b

Please sign in to comment.