[libcxx-commits] [libcxx] [libcxx] improves diagnostics for containers with bad value types (PR #106296)
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 29 17:07:13 PDT 2024
================
@@ -468,6 +475,13 @@ const _DiffType __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer,
template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
class _LIBCPP_TEMPLATE_VIS deque {
+ static_assert(!is_const<_Tp>::value, "'std::deque' cannot hold const types");
----------------
cjdb wrote:
Working on this. Where is a good spot to put it? I was originally putting it in `__config`, but that's not great IMO. Possibly `__type_traits`, since it only consumes type traits?
https://github.com/llvm/llvm-project/pull/106296
More information about the libcxx-commits
mailing list