A. Jiang
A. Jiang
I guess a proper fix would be - introducing a customized traits type (shown as `custom_char_traits` later, but not necessary templatized), - using `basic_string` instead of `basic_string`, and finally, -...
> As far as I know the C++ standard does not mandate the standard library to support unsigned char types in those. `basic_string` is required to support using them as...
> [[nullablepointer.requirements]](https://eel.is/c++draft/nullablepointer.requirements#3): > > > An object `p` of type `P` can be [contextually converted to `bool`](https://eel.is/c++draft/conv#def:conversion,contextual_to_bool). The effect shall be as if `p != nullptr` had been evaluated in...
> _Cpp17NullablePointer_ should be requiring _`boolean-testable`_ ([concept.booleantestable]) I guess it's intentional that implicit convertibility to `bool` (which is required in _`boolean-testable`_) is not required - all of `unique_ptr`, `shared_ptr`, and...
In any case, it's probably wrong to use `std::basic_string` (with the default `char_traits`). See also [LWG4152](https://cplusplus.github.io/LWG/issue4152).