C++ STR Value Type

demonstration string class

Fig 1. STR Class

1.0 Contents

STR holds code for an STR string class. It is not meant to replace std::string. Instead, it serves to illustrate how to build value types, e.g., provide default, copy, and move constructors, copy and move assignment operators, and a destructor. It also illustrates how to implement other string related methods and functions. Each of the STR member functions is dissected in STRCode C++ Bite. That illustrates important implementation techniques for C++ value types, e.g., instances that can be correctly copied and assigned.

2.0 Resources

ValueType.pdf This document walks through each method and function of the STR class, illustrating how to declare, implement, and invoke the method or function. The content is similar to the C++ Bite, but presented in different ways.

Build:

STR code was built with Visual Studio Community Edition - 2019 and tested on Windows 10.