File: cbweirdtest.cc

package info (click to toggle)
wvstreams 4.6.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,820 kB
  • ctags: 7,837
  • sloc: cpp: 64,203; ansic: 4,154; sh: 4,094; makefile: 549; perl: 402
file content (27 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (8)
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
#include "wvtr1.h"

typedef wv::function<void()> Cb;

void f()
{
    // nothing
}


class Derived : public Cb
{
public:
    Derived(const Cb &cb) : Cb(cb)
        { }
};


int main()
{
    Cb cb1(f);
    Cb cb2(cb1);
    Derived cb3(f);
    Derived cb4(cb1);
    Derived cb5(cb3);
    return 0;
}