Errors with XCode C++ Standard Libraries

So I was searching for answer to this question but nothing really came up. I am building a C++ static library for iOS and I use <vector> from standard library. However when I try to build I get error from within SDK iOS 17.5 char_trait.h as follows:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk/usr/include/c++/v1/__string/char_traits.h:290:17 No member named '__constexpr_wmemcmp' in namespace 'std'; did you mean '__constexpr_memchr'?

and in constexpr_c_functions.h as follows:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk/usr/include/c++/v1/__string/constexpr_c_functions.h:117:3 Static assertion failed due to requirement 'sizeof(const wchar_t) == 1': Calling memchr on non-trivially equality comparable types is unsafe.

I've set my c/c++ standards to C17 and C++17 in the build settings.

I have no idea what these weird errors are. Could really use some help.

the first error suggests that your code does not #include <cwchar>

the second error indicates that your code is using memchr on a wchar_t, and it should be using wmemchar.

If you included the code that doesn't compile, rather than just the very last error message, someone might be able to help you further.

Here where therror is coming from in char_trait.h

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
  compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
    if (__n == 0)
      return 0;
    return std::__constexpr_wmemcmp(__s1, __s2, __n);
  }

Here are the sections throwing errors in constexpr_c_functions.h

template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_memchr(_Tp* __str, _Up __value, size_t __count) {
  static_assert(sizeof(_Tp) == 1 && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
                "Calling memchr on non-trivially equality comparable types is unsafe.");
Errors with XCode C++ Standard Libraries
 
 
Q