I'm trying to compile some software on FreeBSD 9.2 and have run into a problem. Not being a c++ developer myself, and apparently being unable to find the right bit of into in google, I've been unable to solve the issue.
The developer inserted -std=c++0x into the CXXFLAGS, but that is unsupported by the version of g++ on FreeBSD. Based on advice I have found on google I've switched that to c++11 using clang++, but I'm still running into this issue:
clang++ -DHAVE_CONFIG_H -I. -I.. -std=c++11 -Wall -Wno-parentheses -Wno-switch -Wno-sign-compare -Wno-char-subscripts -g -O2 -MT packet_handler.o -MD -MP -MF .deps/packet_handler.Tpo -c -o packet_handler.o packet_handler.cpp
In file included from packet_handler.cpp:32:
In file included from ./packetq.h:35:
In file included from ./sql.h:52:
./variant.h:270:49: error: no member named 'hash' in namespace 'std'
case(Coltype::_bool): return std::hash<bool>()(m_val.m_bool);
I have no reason to believe this is limited to being a problem with std::hash .. it's just the first thing to fail. On the other hand.. maybe it is the only problem.
I have found a lot of advice on why it's good to use std::* instead of 'use namespace' and lots of advice for developers on how to write their code well to not have these sorts of problems, but not on how to deal with this in an existing project. I'm in no position to refactor the code in this entire project.
I'm hoping I'm missing something simple here that will let me get this compiled. Can anyone point me to the right bit of documentation?