Skip to content

Commit

Permalink
[inplace_vector] remove constexpr, see if that fixes GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Dec 4, 2023
1 parent a7f8e03 commit f778997
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/sg14/inplace_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct SG14_INPLACE_VECTOR_TRIVIALLY_RELOCATABLE_IF(std::is_trivially_relocatabl
constexpr void set_size_(size_t n) { size_ = n; }

constexpr explicit ipvbase() noexcept {}
constexpr ipvbase(const ipvbase& rhs)
ipvbase(const ipvbase& rhs)
noexcept(std::is_nothrow_copy_constructible_v<T>)
{
if constexpr (std::is_trivially_copy_constructible_v<T>) {
Expand All @@ -103,7 +103,7 @@ struct SG14_INPLACE_VECTOR_TRIVIALLY_RELOCATABLE_IF(std::is_trivially_relocatabl
size_ = rhs.size_;
}
}
constexpr ipvbase(ipvbase&& rhs)
ipvbase(ipvbase&& rhs)
noexcept(std::is_nothrow_move_constructible_v<T>
#if defined(__cpp_lib_trivially_relocatable)
|| std::is_trivially_relocatable_v<T>
Expand All @@ -123,7 +123,7 @@ struct SG14_INPLACE_VECTOR_TRIVIALLY_RELOCATABLE_IF(std::is_trivially_relocatabl
size_ = rhs.size_;
}
}
constexpr void operator=(const ipvbase& rhs)
void operator=(const ipvbase& rhs)
noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_copy_assignable_v<T>)
{
if constexpr (std::is_trivially_copy_constructible_v<T> && std::is_trivially_copy_assignable_v<T> && std::is_trivially_destructible_v<T>) {
Expand All @@ -140,7 +140,7 @@ struct SG14_INPLACE_VECTOR_TRIVIALLY_RELOCATABLE_IF(std::is_trivially_relocatabl
size_ = rhs.size_;
}
}
constexpr void operator=(ipvbase&& rhs)
void operator=(ipvbase&& rhs)
noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_assignable_v<T>)
{
if constexpr (std::is_trivially_move_constructible_v<T> && std::is_trivially_move_assignable_v<T> && std::is_trivially_destructible_v<T>) {
Expand Down

0 comments on commit f778997

Please sign in to comment.