aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/errors/cpp_scope_bad.i
blob: 0396c40fc5b2a2b10823e8a842fb3d2d2b177bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%module xxx

template <typename Tnum>
class Space::A<Tnum>::Anest {
public:
    Anest();
};

namespace N {
  template<typename T> class C {};
}
namespace unrelated {
  %template(cin) N::C<int>;
  template class N::C<int>;
}
struct Outer {
    struct Unrelated<X>  {
      %template(cin) N::C<int>;
      template class N::C<int>;
    };
};

struct ::X::Y<int> {
};

using namespace Nope<double>;

template<typename T>
struct NotANamespace {
};
%template(NotANamespaceInt) NotANamespace<int>;
%template() NotANamespace<double>;

using namespace NotANamespace<double>;

namespace BadEquivalent = NotANamespace<int>;
namespace AwfulEquivalent = Nope<double>;