I'm slightly confused about what happens when a ctor is explicitly defaulted.
Are the two code samples below equivalent?
Are there any constraints on Y
to be able to use the first option?
class X
{
public:
X() = default;
private:
Y m_y;
};
class X
{
public:
X() : m_y() {}
private:
Y m_y;
};