yuanjia1011 / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

MAC OS X not implemented? #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile in mac os x
2. compile the page base example

What is the expected output? What do you see instead?
imac-de-felipe-tonello:Desktop felipetonello$ g++ teste_google.cpp -o 
teste_google
teste_google.cpp: In function ‘int main()’:
teste_google.cpp:14: error: ‘hash’ was not declared in this scope
teste_google.cpp:14: error: missing ‘>’ to terminate the template 
argument list
teste_google.cpp:14: error: template argument 3 is invalid
teste_google.cpp:14: error: expected unqualified-id before ‘>’ token
teste_google.cpp:14: error: expected initializer before ‘>’ token
teste_google.cpp:16: error: ‘months’ was not declared in this scope

What version of the product are you using? On what operating system?
google-sparsehash1.1
Mac OS X 10.5.3
imac-de-felipe-tonello:Desktop felipetonello$ g++ --version
i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)

Original issue reported on code.google.com by felipe.tonello on 24 Jun 2008 at 4:33

GoogleCodeExporter commented 9 years ago
} 2. compile the page base example

When you say the "page base example", what do you mean exactly?

If you're referring to the example at
   http://google-sparsehash.googlecode.com/svn/trunk/doc/sparse_hash_map.html

then yes, you're right, the example is probably incomplete on most
operating systems.  You'll have to say
   using <something>::hash
where <something> is the namespace where hash is defined for your
system.  Unfortunately, it differs from system to system, and even
within the same system (depending on the version of the compiler
used).

You don't say what version of os x you're using, so I don't know
what's the right namespace for you.  It's probably something like ext
or __gnu_cxx.

craig

Original comment by csilv...@gmail.com on 24 Jun 2008 at 6:01