aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/parser/mixin/types.hxx
blob: 708dfc357e87706178e7f47d71dcb86505213671 (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
38
39
40
41
42
43
44
// file      : examples/cxx/parser/mixin/types.hxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain

#ifndef TYPES_HXX
#define TYPES_HXX

struct base
{
  bool
  a () const
  {
    return a_;
  }

  void
  a (bool v)
  {
    a_ = v;
  }

private:
  bool a_;
};

struct derived: base
{
  int
  b () const
  {
    return b_;
  }

  void
  b (int v)
  {
    b_ = v;
  }

private:
  int b_;
};

#endif // TYPES_HXX