title: Ambiguous call to std::atomic function using clang
body: <p>I am attempting to compile my code with clang, I was previously using g++.</p>
  
  <p>I am getting errors compiling the following code:</p>
  
  <pre><code>#include &lt;atomic&gt;
  
  typedef void (*my_func) ();
  int main(int argc, char** argv)
  {
    std::atomic&lt;my_func&gt; _func;
    _func();
    return 0;
  }
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>a.cpp:23:3: error: call to object of type 'std::atomic&lt;my_func&gt;' is ambiguous
    _func();
    ^~~~~
  /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/atomic:304:7: note: conversion candidate of type 'void (*)()'
        operator __pointer_type() const noexcept
        ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/atomic:307:7: note: conversion candidate of type 'void (*)()'
        operator __pointer_type() const volatile noexcept
        ^
  1 error generated.
  </code></pre>
  
  <p>This is not my code, it's legacy code that I need to mantain. In the real code _func is a class member and has a setter and a getter, and from my understanding he intends to protect it so it is not modified when he intends to call it.</p>
  
  <p>Edit:
  I am using clang3.6 (same error on clang3.7) and g++ and std::atomic 4.8.</p>