df83a9bf8b
* gdb.cp/nsusing.exp: Added more tests. * gdb.cp/nsrecurs.exp: Ditto. * gdb.cp/nsusing.cc: Added test functions. * gdb.cp/nsrecurs.cc: Ditto.
57 lines
529 B
C++
57 lines
529 B
C++
namespace A
|
|
{
|
|
int ax = 9;
|
|
}
|
|
|
|
namespace B
|
|
{
|
|
using namespace A;
|
|
}
|
|
|
|
namespace C
|
|
{
|
|
using namespace B;
|
|
}
|
|
|
|
using namespace C;
|
|
|
|
//---------------
|
|
namespace D
|
|
{
|
|
using namespace D;
|
|
int dx = 99;
|
|
}
|
|
using namespace D;
|
|
|
|
//---------------
|
|
namespace
|
|
{
|
|
namespace
|
|
{
|
|
int xx = 999;
|
|
}
|
|
}
|
|
|
|
//---------------
|
|
namespace E
|
|
{
|
|
int ex = 9999;
|
|
}
|
|
|
|
namespace F
|
|
{
|
|
namespace FE = E;
|
|
}
|
|
|
|
namespace G
|
|
{
|
|
namespace GF = F;
|
|
}
|
|
|
|
//----------------
|
|
int main ()
|
|
{
|
|
using namespace D;
|
|
namespace GX = G;
|
|
return ax + dx + xx + G::GF::FE::ex;
|
|
}
|