[llvm-bugs] [Bug 49991] New: Question on backporting DR fixes
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 16 05:09:37 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49991
Bug ID: 49991
Summary: Question on backporting DR fixes
Product: clang
Version: trunk
Hardware: Other
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: cpp at daryl.haresign.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
I spent some time today investigating why Clang was rejecting the following
code in C++17 mode, but not C++20. MSVC and GCC both accept it in C++17.
#include <optional>
struct C {
C(C&) = default;
};
std::optional<C> o;
It seems https://wg21.link/cwg1331 was addressed by https://wg21.link/p641,
which was accepted into C++20.
Clang has the following commit which applies the change only in C++20 mode:
https://github.com/llvm/llvm-project/commit/9b2c5e7c44fd28c31f4a0b088d0bf71da4fddfa5
Whereas GCC and MSVC seem to have applied it unconditionally.
Is there any policy for when defect fixes are applied in earlier standard
modes?
--
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/20210416/229477f7/attachment.html>
More information about the llvm-bugs
mailing list