WangDequan / sparsehash

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

Please implement a check for try in case libstdc++ implements c++11 where tr1 is merged into std #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please implement a check for try in case libstdc++ implements c++11 where tr1 
is merged into std. For instance, clang on OSX 10.9 w/ Xcode 5.0.2 & llvm 5.0 
(500) doesn't include tr1 headers anymore, so build will fail.

Fix here is to patch the header for now:

#define HASH_FUN_H <tr1/functional> => #define HASH_FUN_H <functional>
#define HASH_NAMESPACE std::tr1 => #define HASH_NAMESPACE std

There needs to be a check in place that could verify if either TR1 can be used 
or a newer version is in place. This can easily be done by verifying the std:

if ( __cplusplus >= 201103L ) { /*...*/ }

Thanks

Original issue reported on code.google.com by kkooporation@gmail.com on 3 Mar 2014 at 11:14

GoogleCodeExporter commented 9 years ago
"Please implement a check for tr1"* Sorry, autocorrect.

Original comment by kkooporation@gmail.com on 3 Mar 2014 at 11:21

GoogleCodeExporter commented 9 years ago
could you post what it looks like when it fails please?

Original comment by rogerdp...@gmail.com on 13 Mar 2014 at 3:47

GoogleCodeExporter commented 9 years ago
Failure on OS X looks like: https://gist.github.com/adamv/10224462

Original comment by fla...@gmail.com on 9 Apr 2014 at 3:50

GoogleCodeExporter commented 9 years ago
patch possible (as diff)?

Original comment by rogerpack2005 on 28 Apr 2014 at 11:04