Hi everyone,
I am using pialign on a project and I find it very useful, thanks for the tool!
I am trying to compile it with clang 3.4.1 on FreeBSD 10.2, but when the compiler includes src/include/port/port.h it falls through the hole:
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && \
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
#include <functional>
#include <unordered_map>
#include <unordered_set>
#else // Assuming older OS X, Linux or similar platforms
#include <tr1/functional>
#include <tr1/unordered_map>
#include <tr1/unordered_set>
The assumption that, because __APPLE__ is not defined we need to include tr1 is too strong, because clang++ has had support for c++11 for a very long time already.
The thing is: what is the best way to go about this? Checking for FreeBSD is not the best way, in my opinion, because a FreeBSD user may want to compile their code with an older gcc for whatever reason. Checking for Clang would be ok, but then maybe we should do the same for gcc >4.6, because they also support c++11 header files, and we may very soon have an explosion of possible platforms/compilers/versions.
Since the project seems to be happy with boost (though optionally), maybe
Boost.Config would be a nice solution. Or maybe autoconf can check whether TR1 or plain C++11 headers are needed.
Besides this, I have manually removed the conditional inclusion and everything is compiling fine.
Thank you very much for your help.
Cheers,
Fernando