basics/initclassic.hpp

The following code example is taken from the book
C++ Move Semantics - The Complete Guide by Nicolai M. Josuttis, Leanpub, 2020
The code is licensed under a Creative Commons Attribution 4.0 International License. Creative Commons License

// raw code

#include <string>

class Person {
private:
  std::string first;  // first name
  std::string last;   // last name
public:
  Person(const std::string& f, const std::string& l)
   : first{f}, last{l} {
  }
  //...
};