[llvm-bugs] [Bug 41578] New: test/std/utilities/variant/variant.get/get_type.pass.cpp has workaround for a non-bug

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 24 05:15:29 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41578

            Bug ID: 41578
           Summary: test/std/utilities/variant/variant.get/get_type.pass.c
                    pp has workaround for a non-bug
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

In the two tests
std/utilities/variant/variant.get/get_type.pass.cpp
std/utilities/variant/variant.get/get_index.pass.cpp
you do:

    using V = std::variant<int, const long>;
    constexpr V v(42);
#ifndef __clang__ // Avoid https://bugs.llvm.org/show_bug.cgi?id=15481
    ASSERT_NOEXCEPT(std::get<int>(v));
#endif

That isn't a Clang bug (it was closed as INVALID). Since C++17 constexpr
functions are not implicitly noexcept, and Clang considers that a DR against
C++11 and C++14 too.

G++ 9 now has the same behaviour, changed recently by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603 so this test fails with G++
now as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190424/69608bc3/attachment.html>


More information about the llvm-bugs mailing list