<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 - Regression: std::variant is not a literal type"
   href="https://bugs.llvm.org/show_bug.cgi?id=39232">39232</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression: std::variant is not a literal type
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ldionne@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following program does not compile under Clang ToT:

================================================
#include <variant>

struct ValueBase {
protected:
    constexpr ValueBase() noexcept { }
    constexpr ValueBase(ValueBase const&) noexcept { }
    constexpr ValueBase(ValueBase&&) noexcept { }
};

struct NoCtors : ValueBase {
    NoCtors() = delete;
    NoCtors(NoCtors const&) = delete;
};

int main() {
    using V = std::variant<int, NoCtors>;
    constexpr V v;
}
================================================

Live reproduction: <a href="https://wandbox.org/permlink/b0trjzltSeq2Hirb">https://wandbox.org/permlink/b0trjzltSeq2Hirb</a>

This reproducer was lifted from libc++'s test case
test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp. It
started failing with Clang's r343131:

Author: Richard Smith <<a href="mailto:richard-llvm@metafoo.co.uk">richard-llvm@metafoo.co.uk</a>>
Date:   Wed Sep 26 19:00:16 2018 +0000

    P1008R1 Classes with user-declared constructors are never aggregates in
    C++20.</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>