<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Triviality of special member functions of class with volatile members"
   href="http://llvm.org/bugs/show_bug.cgi?id=21070">21070</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Triviality of special member functions of class with volatile members
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kaballo86@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com, richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following snippet fails to compile, with all 4 static assertions firing:

    #include <type_traits>

    struct foo { volatile int i; };

    int main() {
      static_assert(!std::is_trivially_copy_constructible<foo>::value,
"is_trivially_copy_constructible");
      static_assert(!std::is_trivially_move_constructible<foo>::value,
"is_trivially_move_constructible");
      static_assert(!std::is_trivially_copy_assignable<foo>::value,
"is_trivially_copy_assignable");
      static_assert(!std::is_trivially_move_assignable<foo>::value,
"is_trivially_move_assignable");
    }

I think it should compile fine, at least according to my reading of 12.8/12:

<span class="quote">> A copy/move constructor for class X is trivial if (...)
>  - class X has no non-static data members of volatile-qualified type</span >

and 12.8/25:

<span class="quote">> A copy/move assignment operator for class X is trivial if (...)
>  - class X has no non-static data members of volatile-qualified type</span >

These bullets were introduced by the resolution of CWG496.</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>