title: Checking for C++11 library features
body: <p>What is a good way of checking for the presence of specific C++11 features of the <strong>standard library</strong>.</p>
  
  <p>For compiler features I just went by the way of checking the compiler version for the (IMHO) major compilers (<em>VC++</em>, <em>gcc</em>, <em>clang</em> at the moment, maybe <em>Intel</em>) Although this is not the best and most flexible approach, I don't know of anything better yet, except for <em>clang</em> which has the really nice <code>__has_feature</code> macros.</p>
  
  <p>But it's even worse for library features, which are not coupled that rigidly to the compiler. At the moment I want to use the same approach of checking the compiler version for <em>VC++</em> (where it's pretty easy, assuming it uses its own library). For <em>clang</em> I can at least use <code>__has_include</code> for large-scale header-based queries. Other than that I guess checking <code>__GLIBCXX__</code>'s value if defined might be a good idea, but then again I cannot find any information of what specific <em>libstdc++</em> versions introduced which features, other than what the current version supports.</p>
  
  <p>The methods should be kept to preprocessor checks and the like, since I want to use it in a header-only library without any sophisiticated configure procedure and without using any third-party libraries (and yes, <em>boost</em> is third-party).</p>
  
  <ol>
  <li><p>So what are my possibilities of checking for specific C++11 library features under those (pretty narrow) conditions. Maybe even on the scale of particular functions or types being declared?</p></li>
  <li><p>If checking for the compiler or library version is still the best approach, where can I find detailed information about the particular C++11 features supported by a <strong>specific</strong> version of <em>libstdc++</em> (and maybe other important ones, <em>libc++</em> perhaps)?</p></li>
  </ol>
  
  <p>FWIW at the moment I'm interrested in <code>&lt;cstdint&gt;</code>, C++11 <code>&lt;cmath&gt;</code> functions and <code>std::hash</code>, but this may change and is probably not of importance for the general approach.</p>