The following compiles (on GCC) as long as B is fully known (and actually used) where A::foo() is defined.
#include <vector>
class B;
struct A
{
void foo(const std::vector<B>& bees);
};
Is this defined behavior as far as C++ standard is concerned and an acceptable forward-declaration usage?
0