次のクラスの例では、getter メソッドの例外安全性の保証は何ですか?
そのようなゲッターメソッドは、最低限の強力な保証を提供しますか?
基本型を値で返すと、常にノースロー保証が提供されますか?
class Foo
{
public:
// TODO: Constructor
// Getter methods
int getA() const { return a; }
std::string getB() const { return b; }
std::vector<int> getC() const { return c; }
Bar getD() const { return d; }
std::vector<Bar> getE() const { return e; }
protected:
int a;
std::string b;
std::vector<int> c;
Bar d;
std::vector<Bar> e;
}