[libc++] Fix includes in <string> for no-wchar_t modes (#187650)
Since befaa35212dbaac39cd76a8dc748e4df7c90a0d9, the CI stably failed for the generic-no-wide-characters build, because in no-`wchar_t` modes, the header for `__remove_cv_t` wasn't properly included. This PR adds the missing include of `<__type_traits/remove_cv.h>`. As drive-by, `<__cstddef/size_t.h>` and `<__type_traits/is_constant_evaluated.h>`, which are included by `<cwchar>`, are also made included by `<string>` to avoid potential regression as we're using `size_t` and `__libcpp_is_constant_evaluated()` in `<string>`.
This commit is contained in:
parent
720abd76e7
commit
26ee552ef5
@ -597,6 +597,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
|
||||
# include <__algorithm/remove_if.h>
|
||||
# include <__assert>
|
||||
# include <__config>
|
||||
# include <__cstddef/size_t.h>
|
||||
# include <__debug_utils/sanitizers.h>
|
||||
# include <__format/enable_insertable.h>
|
||||
# include <__functional/hash.h>
|
||||
@ -629,6 +630,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
|
||||
# include <__type_traits/enable_if.h>
|
||||
# include <__type_traits/is_allocator.h>
|
||||
# include <__type_traits/is_array.h>
|
||||
# include <__type_traits/is_constant_evaluated.h>
|
||||
# include <__type_traits/is_convertible.h>
|
||||
# include <__type_traits/is_generic_transparent_comparator.h>
|
||||
# include <__type_traits/is_nothrow_assignable.h>
|
||||
@ -638,6 +640,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
|
||||
# include <__type_traits/is_trivially_constructible.h>
|
||||
# include <__type_traits/is_trivially_copyable.h>
|
||||
# include <__type_traits/is_trivially_relocatable.h>
|
||||
# include <__type_traits/remove_cv.h>
|
||||
# include <__type_traits/remove_cvref.h>
|
||||
# include <__utility/default_three_way_comparator.h>
|
||||
# include <__utility/exception_guard.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user