Let's say that you had a header file #included by multiple translation
units that contains:
const struct { } a;
struct b : decltype(a) { };
Is this a violation of the One Definition Rule? The unnamed type of
"a" has either no or internal linkage (I'm not sure which), so each
translation unit's struct b derives from a different base class,
breaking the One Definition Rule...?
Similarly, this could be asked about anonymous namespaces and lambdas:
namespace { struct a { }; }
struct b : a { };
static auto a = []{};
struct b : decltype(a) { };
Melissa
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
http://lists.isocpp.org/mailman/listinfo.cgi/std-discussion