[llvm-bugs] [Bug 40923] New: Wrapper std::any not copy constructible

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 1 13:07:04 PST 2019


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

            Bug ID: 40923
           Summary: Wrapper std::any not copy constructible
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Following is a reduction of an MSVC usage.

Following code compiles with GGC/MSVC, not with clang:
https://gcc.godbolt.org/z/ii2e2E

t.cpp
=====

#include <any>
#include <type_traits>

struct V
{
    V(std::any a) : a{a} {}
    ~V() = default;

    V(const V &) = default;

    std::any a;
};

static_assert(std::is_copy_constructible_v<V>);

run.sh
======
clang++ -O0  -std=c++17 -w -Wunused-variable t.cpp

-- 
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/20190301/3713f3fa/attachment.html>


More information about the llvm-bugs mailing list