You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
332 B

// Compile with:
// g++ -g -Wall -fPIC -shared -o libtest31-v0.so test31-v0.cc
namespace hidden
{
struct S0
{
int m0;
S0() {}
S0(int v)
: m0(v)
{}
};
void
foo(S0& s)
{
s.m0 = 2;
}
} // end namespace hidden
namespace visible
{
void
bar(int v)
{
hidden::S0 s(v);
hidden::foo(s);
}
} // end namespace visible