[libcxx-commits] [libcxx] [libcxx] improves diagnostics for containers with bad value types (PR #106296)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 30 01:03:32 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");
----------------
philnik777 wrote:

I think `__type_traits/diagnostic_utilities.h` or something like that would be good.

https://github.com/llvm/llvm-project/pull/106296


More information about the libcxx-commits mailing list