From: Peter K. <syn...@us...> - 2005-10-30 14:03:34
|
Update of /cvsroot/loki-lib/loki/test/OrderedStatic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30262/test/OrderedStatic Modified Files: main.cpp Log Message: replace tabs space Index: main.cpp =================================================================== RCS file: /cvsroot/loki-lib/loki/test/OrderedStatic/main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- main.cpp 30 Oct 2005 13:49:44 -0000 1.4 +++ main.cpp 30 Oct 2005 14:03:23 -0000 1.5 @@ -27,32 +27,32 @@ struct L1 { - L1(){std::cout << "create L1: " << this << "\n";} - ~L1(){std::cout << "delete L1: " << this <<" \n";} + L1(){std::cout << "create L1: " << this << "\n";} + ~L1(){std::cout << "delete L1: " << this <<" \n";} }; struct L2 { - L2(){std::cout << "create L2 \n";} - ~L2(){std::cout << "delete L2 \n";} + L2(){std::cout << "create L2 \n";} + ~L2(){std::cout << "delete L2 \n";} }; struct M1 { - M1(){std::cout << "create M1 \n";} - ~M1(){std::cout << "delete M1 \n";} + M1(){std::cout << "create M1 \n";} + ~M1(){std::cout << "delete M1 \n";} }; struct M2 { - M2(){std::cout << "create M2 \n";} - ~M2(){std::cout << "delete M2 \n";} + M2(){std::cout << "create M2 \n";} + ~M2(){std::cout << "delete M2 \n";} }; int f() { - std::cout << "f called \n"; - return 0; + std::cout << "f called \n"; + return 0; } std::string func(); @@ -62,8 +62,8 @@ struct MemberTest { - static Loki::OrderedStatic<1,M1> m1; - static Loki::OrderedStatic<2,M2> m2; + static Loki::OrderedStatic<1,M1> m1; + static Loki::OrderedStatic<2,M2> m2; }; Loki::OrderedStatic<1,M1> MemberTest::m1; Loki::OrderedStatic<2,M2> MemberTest::m2; @@ -72,8 +72,8 @@ Loki::OrderedStatic<1,L1> l1; Loki::OrderedStatic<2,L2> l2; -Loki::OrderedStatic<1, std::string, std::string(*)() > s1( &func ); -Loki::OrderedStatic<2, std::string, Loki::Seq<char *> > s2( "s2" ); +Loki::OrderedStatic<1, std::string, std::string(*)() > s1( &func ); +Loki::OrderedStatic<2, std::string, Loki::Seq<char *> > s2( "s2" ); Loki::OrderedStatic<1, Loki::Functor<int>, Loki::Seq<int(*)()> > f1(f); @@ -81,8 +81,8 @@ struct MemberTest { - static M1 m1; - static M2 m2; + static M1 m1; + static M2 m2; }; M1 MemberTest::m1; M2 MemberTest::m2; @@ -101,42 +101,42 @@ std::string func() { #ifdef TEST_ORDERED_STATIC - return *s2; + return *s2; #else - return s2; + return s2; #endif } int main() -{ - +{ + #ifdef TEST_ORDERED_STATIC - Loki::OrderedStaticManager::Instance().createObjects(); - - std::cout << "\n"; + Loki::OrderedStaticManager::Instance().createObjects(); + + std::cout << "\n"; - (*f1)(); + (*f1)(); - std::cout << "value of s1: " << (*s1).c_str() << "\n"; - std::cout << "value of s2: " << (*s2).c_str() << "\n"; - - std::string s("text11"); - *s1=s; - std::cout << "value of s1: " << (*s1).c_str() << "\n"; - + std::cout << "value of s1: " << (*s1).c_str() << "\n"; + std::cout << "value of s2: " << (*s2).c_str() << "\n"; + + std::string s("text11"); + *s1=s; + std::cout << "value of s1: " << (*s1).c_str() << "\n"; + #else - - std::cout << "\n"; - f1(); - - std::cout << "s1 = " << s1.c_str() << "\n"; - std::cout << "s2 = " << s2.c_str() << "\n"; + + std::cout << "\n"; + f1(); + + std::cout << "s1 = " << s1.c_str() << "\n"; + std::cout << "s2 = " << s2.c_str() << "\n"; #endif - std::cout << "\n"; - return 0; + std::cout << "\n"; + return 0; } |