
Asger Mangaard wrote:
The 'inline' keywords are useless (implicit inline), at least on conforming compilers.
The inline keyword is used to allow compliance also with non-conforming compilers.
I'm curious: which compiler? I don't see any boost library following this convention.
Fixed. Sorry. The C prefix is just the code convention I've always used. If it's vital, I'll change it.
Ok. :-) But the most important issue is the motivation, i.e. you still need to provide (empty) definitions members and functions. Thus, for me, this utility doesn't by much beside the const correctness. (You need an indirection when using raw pointer or reference.) I prefer stating e.g., Foo::Foo(Foo const& other) : priv_(*other.priv_) { } instead of _empty and required_ Ctors and functions, but others might think different. If you can address the issue of the out-of-line definitions in any way, that would be the step in the right direction, while i feel that this is not possible with a greedy approach, because it always boils down to the point that the implementation file holds the struct. David.