F
Fraser Ross
Should the A object created by func be destroyed after a B is created or
before? I'd like to know where in the standard this is described.
class A {
public:
A() {
}
~A() {
}
};
class B {
public:
explicit B(A const &) {
}
~B() {
}
};
A const & func() {
return A();
}
int main()
{
B(func());
return 0;
}
before? I'd like to know where in the standard this is described.
class A {
public:
A() {
}
~A() {
}
};
class B {
public:
explicit B(A const &) {
}
~B() {
}
};
A const & func() {
return A();
}
int main()
{
B(func());
return 0;
}