We are programming a logging library that keeps itself in a .hpp file. We would like to include <tr1/unordered_map>
(if the compiler supports TR1,) or the standard <map>
otherwise. Is there a standard way of checking at compile time if tr1 is available or not?
I was thinking that the same way that the "__cplusplus
" define symbol is present, there could have been defined a "__cxx__tr1
" or something like that. I haven't seen that in the drafts for TR1, so I assume it is not present, but I wanted to ask first just in case.
As a note, if those defines don't exist, it wouldn't be a bad idea to include them in proposals themselves.