diff --git a/include/bitcoin/network/config/address.hpp b/include/bitcoin/network/config/address.hpp index 4c4bd4702..223aefbb6 100644 --- a/include/bitcoin/network/config/address.hpp +++ b/include/bitcoin/network/config/address.hpp @@ -99,7 +99,7 @@ class BCT_API address messages::address_item::cptr address_; }; -typedef std_vector
addresses; +typedef std::vector
addresses; } // namespace config } // namespace network diff --git a/include/bitcoin/network/config/authority.hpp b/include/bitcoin/network/config/authority.hpp index d92e21f80..edadea176 100644 --- a/include/bitcoin/network/config/authority.hpp +++ b/include/bitcoin/network/config/authority.hpp @@ -112,7 +112,7 @@ class BCT_API authority uint8_t cidr_; }; -typedef std_vector authorities; +typedef std::vector authorities; } // namespace config } // namespace network diff --git a/include/bitcoin/network/config/endpoint.hpp b/include/bitcoin/network/config/endpoint.hpp index 78067c0eb..826be5453 100644 --- a/include/bitcoin/network/config/endpoint.hpp +++ b/include/bitcoin/network/config/endpoint.hpp @@ -113,7 +113,7 @@ class BCT_API endpoint uint16_t port_; }; -typedef std_vector endpoints; +typedef std::vector endpoints; } // namespace config } // namespace network diff --git a/include/bitcoin/network/messages/compact_block.hpp b/include/bitcoin/network/messages/compact_block.hpp index 311124cb9..c05735327 100644 --- a/include/bitcoin/network/messages/compact_block.hpp +++ b/include/bitcoin/network/messages/compact_block.hpp @@ -34,7 +34,7 @@ struct BCT_API compact_block { typedef std::shared_ptr cptr; typedef system::mini_hash short_id; - typedef system::mini_hashes short_id_list; + typedef std_vector short_id_list; static const identifier id; static const std::string command; diff --git a/src/messages/headers.cpp b/src/messages/headers.cpp index 43447d794..3c3ff3588 100644 --- a/src/messages/headers.cpp +++ b/src/messages/headers.cpp @@ -133,7 +133,7 @@ bool headers::is_sequential() const NOEXCEPT hashes headers::to_hashes() const NOEXCEPT { - hashes out; + hashes out{}; out.reserve(header_ptrs.size()); for (const auto& header: header_ptrs) @@ -144,18 +144,15 @@ hashes headers::to_hashes() const NOEXCEPT inventory_items headers::to_inventory(inventory::type_id type) const NOEXCEPT { - inventory_items out; + inventory_items out{}; out.reserve(header_ptrs.size()); for (const auto& header: header_ptrs) - { -#if defined(HAVE_CLANG) - // emplace_back aggregate initialization requires clang 16. out.push_back({ type, header->hash() }); -#else - out.emplace_back(type, header->hash()); -#endif - } + + // emplace_back aggregate initialization requires clang 16. + // This also fails following change to pmr vector. + ////out.emplace_back(type, header->hash()); return out; } diff --git a/test/test.hpp b/test/test.hpp index 3669be8ed..48033f45b 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -55,10 +55,22 @@ namespace std { std::ostream& operator<<(std::ostream& stream, const system::data_slice& slice) noexcept; -// vector -> join(< -> join(< std::ostream& operator<<(std::ostream& stream, - const std_vector& values) noexcept + const std::vector& values) NOEXCEPT +{ + // Ok when testing serialize because only used for error message out. + BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT) + stream << system::serialize(values); + BC_POP_WARNING() + return stream; +} + +// std_vector -> join(< +std::ostream& operator<<(std::ostream& stream, + const std_vector& values) NOEXCEPT { // Ok when testing serialize because only used for error message out. BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)