title: Why doesn't this enum convert to int?
body: <p>Why does the following code not compile under g++ (C++14), MSVC (C++14), or ARM (C++03)?</p>
  
  <p>The named Error instance calls the integer constructor, but the anonymous Error instance does not resolve.</p>
  
  <pre><code>class Error
  {
  public:
      Error(int err) : code_(err) {}
      const int code_;
  };
  
  enum Value
  {
      value_1
  };
  
  int main()
  {
      // compiles
      Error e(value_1);
  
      // does not compile under G++, ARM, or MSVC
      Error(value_1);
  }
  </code></pre>
  
  <p>Example error under G++: (<a href="http://coliru.stacked-crooked.com/a/6d397d806b227432" rel="noreferrer">Coliru link</a>)</p>
  
  <p><code>g++ -std=c++14 -O2 -Wall -pedantic -pthread main.cpp &amp;&amp; ./a.out</code></p>
  
  <pre><code>main.cpp: In function 'int main()':
  main.cpp:19:18: error: no matching function for call to 'Error::Error()'
       Error(value_1);
                    ^
  main.cpp:4:5: note: candidate: Error::Error(int)
       Error(int err) : code_(err) {}
       ^~~~~
  main.cpp:4:5: note:   candidate expects 1 argument, 0 provided
  main.cpp:1:7: note: candidate: constexpr Error::Error(const Error&amp;)
   class Error
         ^~~~~
  main.cpp:1:7: note:   candidate expects 1 argument, 0 provided
  main.cpp:1:7: note: candidate: constexpr Error::Error(Error&amp;&amp;)
  main.cpp:1:7: note:   candidate expects 1 argument, 0 provided
  </code></pre>