There's an easier way to add the namespace logic to all files. Currently we
need to add 3 or 4
lines at the start and end of every file which makes for a lot of
cut-and-pasting.
Instead we could define a pair of macros:
#define OSL_NAMESPACE_BEGIN namespace OSL_NAMESPACE {
#define OSL_NAMESPACE_END } using namespace OSL_NAMESPACE;
When OSL_NAMESPACE is not being used, these macros would be defined to be empty.
Instead of adding 7 lines per file, this adds only 3 (1 include for the
definition and the
begin/end). Could be reduced to just 2 lines/file if we put this logic in a
header everyone already
includes.
It also centralizes the handling of this subtle feature.
1/16/09 11:20:14 changed by lg
I'm ok with this change. Maybe the macros should be in oslconfig.h? Or their own file?
11/16/09 11:21:42 changed by ckulla
oslconfig.h sounds fine to me.
Original issue reported on code.google.com by rene.lim...@gmail.com on 11 Jan 2010 at 6:47
Original issue reported on code.google.com by
rene.lim...@gmail.com
on 11 Jan 2010 at 6:47