Fix some usage of global scope operator ::

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11719 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-11-03 19:14:37 +00:00
commit da1fc3ab8f
5 changed files with 49 additions and 0 deletions

View file

@ -69,6 +69,7 @@ namespace Two {
template <typename T1> struct TwoParm<T1 *, int *> { void e() {} };
template <typename T1> struct TwoParm<T1, int> { void f() {} };
template <> struct TwoParm<int *, const int *> { void g() {} };
template <> struct TwoParm<Concrete, Concrete *> { void h() {} };
}
%}
@ -90,6 +91,7 @@ namespace Two {
%template(B1_) ::Two::TwoParm<char *, ::Concrete *>;
%template(E1_) Two::TwoParm<const int *, int *>;
%template(E2_) Two::TwoParm<int **, int *>;
%template(H_) Two::TwoParm< ::Concrete, ::Concrete * >;
// Many template parameters

View file

@ -74,3 +74,14 @@ struct X {
};
}
%inline %{
namespace SpaceMan {
typedef double SpaceManDouble;
}
using namespace ::SpaceMan; // global namespace prefix
SpaceManDouble useSpaceMan(SpaceManDouble s) { return s; }
%}

View file

@ -24,6 +24,12 @@ public:
const B GetBconst() const {
return b;
}
::B GetBGlobalQualifier() {
return b;
}
const ::B GetBconstGlobalGlobalQualifier() const {
return b;
}
};
%}