Questions tagged [char-traits]

Character traits classes specify character properties and provide specific semantics for certain operations on characters and sequences of characters.

Character traits classes specify character properties and provide specific semantics for certain operations on characters and sequences of characters.

The standard library includes a standard set of character traits classes that can be instantiated from the char_traits template, and which are used by default both for the basic_string objects and for the input/output stream objects.

17 questions
0
votes
2 answers

Convert std::string to ci_string

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 throw compiler errors: std::string s {"a"}; ci_string cis {s}; ci_string cis (s); ci_string cis…
Big McLargeHuge
  • 14,841
  • 10
  • 80
  • 108
-2
votes
1 answer

How to initialize custom analogue for std::cout?

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 traits from std, as I've implemented ones myself. How can I create a direct analogue of std::cout that…
Capy Maths
  • 79
  • 6
1
2