Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/deleted7.C

raw
1 // PR c++/61080
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wreturn-type" }
4
5 struct AAA
6 {
7 int a1, a2, a3;
8 void *p;
9 };
10
11 template <typename K, typename V>
12 class WeakMapPtr
13 {
14 public:
15 WeakMapPtr() : ptr(nullptr) {};
16 bool init(AAA *cx);
17 private:
18 void *ptr;
19 WeakMapPtr(const WeakMapPtr &wmp) = delete;
20 WeakMapPtr &operator=(const WeakMapPtr &wmp) = delete;
21 };
22
23 template <typename K, typename V>
24 bool WeakMapPtr<K, V>::init(AAA *cx)
25 {
26 ptr = cx->p;
27 return true;
28 }
29
30 struct JSObject
31 {
32 int blah;
33 float meh;
34 };
35
36 template class WeakMapPtr<JSObject*, JSObject*>;