https://bugs.llvm.org/show_bug.cgi?id=52576
Bug ID: 52576
Summary: std::variant<std::string> not working with -std=c++20
in TRUNK Clang of GodBolt
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: release blocker
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: artyom.polkovni...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
Created attachment 25465
--> https://bugs.llvm.org/attachment.cgi?id=25465&action=edit
Errors log
If I compile on godbolt's trunk Clang with option -std=c++20 following code:
#include <variant>
#include <string>
int main() { std::variant<std::string> s = std::string("abc"); }
I get lots of errors:
==================================================
In file included from <source>:1:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/12.0.0/../../../../include/c++/12.0.0/variant:460:2:
error: attempt to use a deleted function
_Variant_storage(in_place_index_t<_Np>, _Args&&... __args)
^
............... MANY MORE ERRORS HERE .......................
==================================================
but if I compile same code with -std=c++17 or with release 13.0.0 CLang, then
everything compiles and works.
I got this error with -std=c++20 on current TRUNK in GodBolt
https://godbolt.org/z/x4o8GKbTv
while -std=c++17 on TRUNK works https://godbolt.org/z/on9EbeY7z and also
release 13.0.0 works with -std=c++20 https://godbolt.org/z/vGhj7q63z
Attaching full log "errors.txt" of errors in case if godbolt updates TRUNK to
some other working version.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs