ReactOS  0.4.14-dev-604-gcfdd483
resolve_name.cpp
Go to the documentation of this file.
1 #define _STLP_DO_IMPORT_CSTD_FUNCTIONS
2 #include <cmath>
3 
4 #if !defined (STLPORT) || defined (_STLP_USE_NAMESPACES)
5 
6 namespace NS1 {
7 
8 bool f()
9 {
10  double d( 1.0 );
11 
12  d = sqrt( d );
13  d = ::sqrt( d );
14  d = std::sqrt( d );
15  return d == 1.0;
16 }
17 
18 }
19 
20 namespace {
21 
22 bool g()
23 {
24  double d( 1.0 );
25 
26  d = sqrt( d );
27  d = ::sqrt( d );
28  d = std::sqrt( d );
29  return d == 1.0;
30 }
31 
32 }
33 
34 // VC6 consider call to sqrt ambiguous as soon as using namespace std has
35 // been invoked.
36 #if !defined (STLPORT) || !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300)
37 using namespace std;
38 #endif
39 
40 bool h()
41 {
42  double d( 1.0 );
43 
44  d = sqrt( d );
45  d = ::sqrt( d );
46  d = std::sqrt( d );
47  return d == 1.0;
48 }
49 
50 struct sq
51 {
52  sq() {}
53 
54  double sqroot( double x ) {
55  using std::sqrt;
56  return sqrt(x);
57  }
58 };
59 
60 #endif
61 
62 
63 #if 0 // Do nothing, this should be compiled only
64 
65 #include "cppunit/cppunit_proxy.h"
66 
67 class ResolveNameTest : public CPPUNIT_NS::TestCase
68 {
69  CPPUNIT_TEST_SUITE(ResolveNameTest);
70  CPPUNIT_TEST(cstyle);
72 
73 protected:
74  void cstyle();
75 };
76 
77 CPPUNIT_TEST_SUITE_REGISTRATION(ResolveNameTest);
78 
79 void ResolveNameTest::cstyle()
80 {
81 }
82 
83 #endif
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
#define CPPUNIT_TEST_SUITE(X)
Definition: cppunit_mini.h:142
double sqroot(double x)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define CPPUNIT_TEST(X)
Definition: cppunit_mini.h:182
Definition: features.h:417
bool f()
Definition: resolve_name.cpp:8
#define CPPUNIT_TEST_SUITE_END()
Definition: cppunit_mini.h:191
#define d
Definition: ke_i.h:81
bool h()
#define CPPUNIT_TEST_SUITE_REGISTRATION(X)
Definition: cppunit_mini.h:193