File: test31-v1.cc

package info (click to toggle)
libabigail 2.2-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 881,820 kB
  • sloc: xml: 572,528; cpp: 98,056; sh: 11,779; makefile: 2,951; ansic: 2,913; python: 1,345
file content (40 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (6)
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
// Compile with:
// g++ -g -Wall -fPIC -shared -o libtest31-v1.so test31-v1.cc

namespace hidden
{

struct S0
{
  int m0;
  char m1;

  S0()
    : m0(), m1()
  {}

  S0(int v)
    : m0(v),
      m1()
  {}
};

void
foo(S0& s)
{
  s.m0 = 2;
  s.m1 = 1;
}

} // end namespace hidden

namespace visible
{
void
bar(int v)
{
  hidden::S0 s(v);
  hidden::foo(s);
}

} // end namespace visible