[ 
https://issues.apache.org/jira/browse/IGNITE-24990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940321#comment-17940321
 ] 

Manuel Pöter commented on IGNITE-24990:
---------------------------------------

I see two options to fix this - either implement a custom traits class 
according to 
[[char.traits.require]|https://timsong-cpp.github.io/cppwp/n4659/char.traits.require]
 and us that one in the instantiation of `std::basic_string_view`, or 
alternatively implement a custom view type from scratch that provides the same 
interface.

> MacOS C++ builds broken for bytes_view
> --------------------------------------
>
>                 Key: IGNITE-24990
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24990
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>            Reporter: Manuel Pöter
>            Priority: Major
>              Labels: ignite-3
>
> After a recent XCode update MacOS C++ builds are broken with the following 
> error:
> {code}
> > Task :platforms:cmakeBuildClient
> In file included from 
> /Users/apolo/Work/ignite-3/modules/platforms/cpp/ignite/common/big_decimal.cpp:18:
> In file included from 
> /Users/apolo/Work/ignite-3/modules/platforms/cpp/ignite/common/big_decimal.h:20:
> In file included from 
> /Users/apolo/Work/ignite-3/modules/platforms/cpp/ignite/common/big_integer.h:20:
> In file included from 
> /Users/apolo/Work/ignite-3/modules/platforms/cpp/ignite/common/bytes_view.h:22:
> In file included from 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/string:648:
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/string_view:300:42:
>  error: implicit instantiation of undefined template 
> 'std::char_traits<std::byte>'
>   300 |   static_assert(is_same<_CharT, typename 
> traits_type::char_type>::value,
>       |                                          ^
> /Users/apolo/Work/ignite-3/modules/platforms/cpp/ignite/common/bytes_view.h:29:21:
>  note: in instantiation of template class 'std::basic_string_view<std::byte>' 
> requested here
>    29 | struct bytes_view : std::basic_string_view<std::byte> {
>       |                     ^
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__string/char_traits.h:45:8:
>  note: template is declared here
>    45 | struct char_traits;
>       |        ^
> 1 error generated.
> make[2]: *** [ignite/common/CMakeFiles/ignite-common.dir/big_decimal.cpp.o] 
> Error 1
> make[1]: *** [ignite/common/CMakeFiles/ignite-common.dir/all] Error 2
> make: *** [all] Error 2
> {code}
> The reason is the following deprecation (see [release 
> notes|https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes]):
> {quote}
> The base template for std::char_traits has been removed. If you are using 
> std::char_traits with types other than char, wchar_t, char8_t, char16_t, 
> char32_t or a custom character type for which you specialized 
> std::char_traits, your code will stop working. The Standard does not mandate 
> that a base template is provided, and such a base template is bound to be 
> incorrect for some types, which could previously cause unexpected behavior 
> while going undetected.
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to