yuanjia1011 / sparsehash

Automatically exported from code.google.com/p/sparsehash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

GoogleCodeExporter opened this issue · comments

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

"Please implement a check for tr1"* Sorry, autocorrect.

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

could you post what it looks like when it fails please?

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

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

patch possible (as diff)?

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