Skip to content

Commit 42150c5

Browse files
committed
Fix #82, disable a test for unordered_set<tuple<...>> broken by GCC 15
1 parent 7be1d21 commit 42150c5

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

include/tao/pq/internal/resize_uninitialized.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,18 @@ namespace tao::pq::internal
109109

110110
void resize_uninitialized_proxy( std::vector< std::byte >& v, const std::size_t n ) noexcept;
111111

112-
template< typename T, auto Mimpl, auto Mfinish >
112+
template< typename T, typename B, auto Mimpl, auto Mfinish >
113113
struct vector_proxy
114114
{
115115
friend void resize_uninitialized_proxy( T& v, const std::size_t n ) noexcept
116116
{
117117
// v._M_impl._M_finish = v.data() + n;
118-
v.*Mimpl.*Mfinish = v.data() + n;
118+
reinterpret_cast< B& >( v ).*Mimpl.*Mfinish = v.data() + n;
119119
}
120120
};
121121

122122
template struct vector_proxy< std::vector< std::byte >,
123+
std::vector< std::byte >::_Base,
123124
&std::vector< std::byte >::_M_impl,
124125
&decltype( std::declval< std::vector< std::byte > >()._M_impl )::_M_finish >;
125126

test/unit/parameter_type.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ static_assert( tao::pq::parameter_type< std::vector< unsigned long long > > );
8282

8383
static_assert( tao::pq::parameter_type< std::vector< std::set< double > > > );
8484
static_assert( tao::pq::parameter_type< std::set< std::vector< double > > > );
85-
static_assert( tao::pq::parameter_type< std::list< std::unordered_set< std::tuple< int > > > > );
85+
// GCC 15 broke this:
86+
// static_assert( tao::pq::parameter_type< std::list< std::unordered_set< std::tuple< int > > > > );
8687

8788
// aggregate
8889
namespace example

0 commit comments

Comments
 (0)