I am trying to implement my own basic_string, but came across a problem with printing my strings. I am not going to use std::char_traits and other tra ...
I am trying to implement my own basic_string, but came across a problem with printing my strings. I am not going to use std::char_traits and other tra ...
The problem is I don't understand why those should be separate. Why not use one class, like CharType, that would contain both the logic of char traits ...
I am working on a Linux system, and I think standard Linux std::string supports both Unicode and ASCII characters. So, I want to use std::string in my ...
The question How to use correctly the return value from std::cin.get() and std::cin.peek()? made me wonder if it is guaranteed that std::char_traits& ...
When trying to compile this code: compiler will give me warning about oh-not-so-healthy conversion from unsigned char to char in call to write(). A ...
According to the GCC 8 Release Note, it is now possible to use std::char_traits<char> and std::char_traits<wchar_t> in constant expression ...
Consider the following constexpr function, static_strcmp, which uses C++17's constexpr char_traits::compare function: godbolt shows this gets evalu ...
I am doing a lot of parsing/processing, where leading/trailing whitespace and case insensitivity is given. So I made a basic char trait for std::basic ...
In one of my projects I have to cache positional information about certain data chunks found in large files. I've already implemented a small API buil ...
I used this approach to create a case-insensitive typedef for string. Now, I'm trying to convert a std::string to ci_string. All of the following thro ...
There are already questions here on Stackoverflow asking why basic_fstream<uint8_t> doesn't work. The answers say that char_traits is only speci ...
Why can't you just use the assignment operator instead of using this function? What is this used for? ...
This is related to: std::basic_string specialization and Circumventing template specialization I tried the solution from std::basic_string specializ ...
I notice that in my copy of the SGI STL reference, there is a page about Character Traits but I can't see how these are used? Do they replace the stri ...