https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120390
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There's also the source context which should be pretty clear what the assertion
was testing when it failed:
188 | static_assert(is_destructible<_Value_type>::value,
But I think the best solution is to move the static_assert so it is only
checked for types with a trivial destructor, because it isn't needed otherwise:
--- a/libstdc++-v3/include/bits/stl_construct.h
+++ b/libstdc++-v3/include/bits/stl_construct.h
@@ -204,9 +204,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef typename iterator_traits<_ForwardIterator>::value_type
_Value_type;
#if __cplusplus >= 201103L
- // A deleted destructor is trivial, this ensures we reject such types:
- static_assert(is_destructible<_Value_type>::value,
- "value type must be destructible");
if constexpr (!__has_trivial_destructor(_Value_type))
for (; __first != __last; ++__first)
std::_Destroy(std::__addressof(*__first));
@@ -215,6 +212,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
for (; __first != __last; ++__first)
std::destroy_at(std::__addressof(*__first));
#endif
+ else
+ // A deleted destructor is trivial, this ensures we reject such types:
+ static_assert(is_destructible<_Value_type>::value,
+ "value type must be destructible");
#else
std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
__destroy(__first, __last);
This restores the original error: 'MovieData::~MovieData()' is private within
this context