[llvm-bugs] [Bug 39964] New: Unclear error message
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 11 13:41:46 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39964
Bug ID: 39964
Summary: Unclear error message
Product: clang
Version: 7.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
test.cpp
========
struct A
{
A() = default;
A(A&&) {}
};
struct B : A
{
B() = default;
B(B&&) noexcept = default;
A a;
};
Error message:
==============
exception specification of explicitly defaulted move constructor does not match
the calculated one
see https://gcc.godbolt.org/z/lvQ6a_
The error message itself doesn't help me solving the problem.
I now know that B can't be nothrow-move-constructable.
However, I don't get told why this is the case.
For this specific case, I rather add 'noexcept' to class A, than removing it
from B.
Knowing where the 'calculated one' gets the different result from, allows me to
do so.
--
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/20181211/2fb946dc/attachment.html>
More information about the llvm-bugs
mailing list