Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenresolve_name.cpp
Go to the documentation of this file.
00001 #define _STLP_DO_IMPORT_CSTD_FUNCTIONS 00002 #include <cmath> 00003 00004 #if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES) 00005 00006 namespace NS1 { 00007 00008 bool f() 00009 { 00010 double d( 1.0 ); 00011 00012 d = sqrt( d ); 00013 d = ::sqrt( d ); 00014 d = std::sqrt( d ); 00015 return d == 1.0; 00016 } 00017 00018 } 00019 00020 namespace { 00021 00022 bool g() 00023 { 00024 double d( 1.0 ); 00025 00026 d = sqrt( d ); 00027 d = ::sqrt( d ); 00028 d = std::sqrt( d ); 00029 return d == 1.0; 00030 } 00031 00032 } 00033 00034 // VC6 consider call to sqrt ambiguous as soon as using namespace std has 00035 // been invoked. 00036 #if !defined (STLPORT) || !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) 00037 using namespace std; 00038 #endif 00039 00040 bool h() 00041 { 00042 double d( 1.0 ); 00043 00044 d = sqrt( d ); 00045 d = ::sqrt( d ); 00046 d = std::sqrt( d ); 00047 return d == 1.0; 00048 } 00049 00050 struct sq 00051 { 00052 sq() {} 00053 00054 double sqroot( double x ) { 00055 using std::sqrt; 00056 return sqrt(x); 00057 } 00058 }; 00059 00060 #endif 00061 00062 00063 #if 0 // Do nothing, this should be compiled only 00064 00065 #include "cppunit/cppunit_proxy.h" 00066 00067 class ResolveNameTest : public CPPUNIT_NS::TestCase 00068 { 00069 CPPUNIT_TEST_SUITE(ResolveNameTest); 00070 CPPUNIT_TEST(cstyle); 00071 CPPUNIT_TEST_SUITE_END(); 00072 00073 protected: 00074 void cstyle(); 00075 }; 00076 00077 CPPUNIT_TEST_SUITE_REGISTRATION(ResolveNameTest); 00078 00079 void ResolveNameTest::cstyle() 00080 { 00081 } 00082 00083 #endif Generated on Thu May 24 2012 04:36:13 for ReactOS by
1.7.6.1
|