From: <sv...@ww...> - 2007-04-07 22:32:28
|
Author: mkrose Date: 2007-04-07 15:32:21 -0700 (Sat, 07 Apr 2007) New Revision: 2069 Modified: trunk/csp/csplib/util/Namespace.h Log: Remove leading :: from csp namespace macro to avoid compile errors in swig generated code. For the curious, ::csp::xxx gets used as a template argument by swig, producing "<::csp::xxx>". The leading "<:" is a digraph in C++ and C99, and is interpreted as "[". So you have to put a space after the "<" for it to parse correctly. This is somewhat similar (in effect) to the problem of having ">>" at the end of nested template arguments. In any event, the leading namespace qualifier isn't actually needed, so removing it is the simplest solution (although really swig should be more careful). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2069 Modified: trunk/csp/csplib/util/Namespace.h =================================================================== --- trunk/csp/csplib/util/Namespace.h 2007-04-06 13:04:31 UTC (rev 2068) +++ trunk/csp/csplib/util/Namespace.h 2007-04-07 22:32:21 UTC (rev 2069) @@ -4,6 +4,6 @@ #define CSP_NAMESPACE namespace csp { #define CSP_NAMESPACE_END } -#define CSP(x) ::csp::x +#define CSP(x) csp::x #endif // __CSPLIB_UTIL_NAMESPACE_H__ |