title: GCC-7 C++17 cannot find aligned_alloc
body: <p>I am trying to use <a href="http://en.cppreference.com/w/cpp/memory/c/aligned_alloc" rel="noreferrer">aligned_alloc</a> in my C++ code but it fails to compile:</p>
  
  <pre><code>cc1plus: warning: command line option '-std=c11' is valid for C/ObjC but not for C++
  vec.cpp: In function 'int main()':
  vec.cpp:13:30: error: 'aligned_alloc' was not declared in this scope
     uint8_t *arr1 = (uint8_t *)aligned_alloc(16, 16);
  </code></pre>
  
  <p>I am compiling with: <code>g++-7 -std=c++17 vec.cpp</code> on <code>Mac OS X 10.13.3</code> with G++ version: <code>g++-7 (Homebrew GCC 7.2.0_1) 7.2.0</code></p>
  
  <p><code>aligned_alloc</code> should be a part of C++17, so I'm confused why it isn't working. Is there some other way to get aligned memory in C++17?</p>
  
  <p>Here is a code example that does not work:</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;cstdint&gt;
  
  int main() {
      uint8_t *arr1 = (uint8_t *)std::aligned_alloc(16, 16);
      std::free(arr1);
      return 0;
  }
  </code></pre>