<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - std::chrono exception specification of explicitly defaulted default constructor does not match the calculated one"
   href="https://bugs.llvm.org/show_bug.cgi?id=35204">35204</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>std::chrono exception specification of explicitly defaulted default constructor does not match the calculated one
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jvapen@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hello all,

it seems to be that the following code is accepted by MSVC while clang gives an
error on the same thing.

#include <atomic>
#include <chrono>

struct A {
   std::atomic<std::chrono::time_point<std::chrono::system_clock>> t{};
};



"clang-cl.exe" -fms-compatibility-version=19 -Werror -Weverything
-Wno-c++98-compat   /EHsc  t.cpp 


"cl.exe"  /EHsc  t.cpp

exception specification of explicitly defaulted default constructor does not
match the calculated one



In file included from t.cpp:1:
\Vs2015\VC\include\atomic(513,2):  error: exception specification of explicitly
defaulted default
      constructor does not match the calculated one
        _Atomic_base() _NOEXCEPT = default;
        ^
\Vs2015\VC\include\atomic(668,5):  note: in instantiation of template class
      'std::_Atomic_base<std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<long long,
      std::ratio<1, 10000000> > >, 8>' requested here
                : _Atomic_base<_Ty, sizeof (_Ty)>
                  ^
t.cpp(5,68):  note: in instantiation of template class
'std::atomic<std::chrono::time_point<std::chrono::system_clock,
      std::chrono::duration<long long, std::ratio<1, 10000000> > > >' requested
here
   std::atomic<std::chrono::time_point<std::chrono::system_clock>> t{};</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>