6.2 Special Member Function Templates 6.2 特殊成员函数模板 Member function templates can also be used as special member functions, including as a constructor, which, however, might lead to surprising behavior. 特殊成员函数也可以是模板,例如构造函数。但是这可能会导致令人奇怪的行为。 Consider the following example: 考虑下面的例子: #include <utility> #include < string > #include <iostream> class Person { private : std:: string name; public : // constructor for passed initial name: explicit Person(std:: string const & n) : name(n) { std::cout << " copying string-CONSTR for ' " << name << " '\n " ; } explicit Person(std:: string && n) : name(std: