On 12 March 2010 10:05, Konstantin Tokarev <[email protected]> wrote: > Hello! > Recently I've found OB can't be compiled with GCC 4.4 and Boost enabled > because of redefinition of unordered_map in unique.cpp > I propose to make custom header "unordered_map.h" to prevent different > conditions in different files, e.g. > #ifdef _MSC_VER > #include <unordered_map> > #elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) > #include <tr1/unordered_map> > #else > #ifdef USE_BOOST > #include <boost/tr1/unordered_map.hpp> > #else > #define NO_UNORDERED_MAP > #include <map> > #endif > #endif > > and check for NO_UNORDERED_MAP later
Ok, I've fixed this. USE_BOOST is only defined for GCC3.x (and it's required). > Also, in obmolecformat.h <hash_map> is used for MSVC. Are both variants > (hash_map and unordered_map) available for all versions? I think hash_map is > older > Also, I think we should prepare for c++0x standard (last time I tried to > compile OB with c++0x compilation failed with lots of errors) I don't really understand the motivation for moving away from std::map. All of our bindings will have difficulties if the API moves away from using the 'standard' STL objects (indeed, I'm not even sure that std::map is supported by some of them as it is). I understand that std::other_maps might perform better in time- and memory-critical sections of the code, but please keep them internal if at all possible. > -- > Regards, > Konstantin > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > OpenBabel-Devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ OpenBabel-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-devel
