[LLVMbugs] [Bug 21070] New: Triviality of special member functions of class with volatile members
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 25 08:11:11 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21070
Bug ID: 21070
Summary: Triviality of special member functions of class with
volatile members
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: kaballo86 at hotmail.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com,
richard-llvm at metafoo.co.uk
Classification: Unclassified
The following snippet fails to compile, with all 4 static assertions firing:
#include <type_traits>
struct foo { volatile int i; };
int main() {
static_assert(!std::is_trivially_copy_constructible<foo>::value,
"is_trivially_copy_constructible");
static_assert(!std::is_trivially_move_constructible<foo>::value,
"is_trivially_move_constructible");
static_assert(!std::is_trivially_copy_assignable<foo>::value,
"is_trivially_copy_assignable");
static_assert(!std::is_trivially_move_assignable<foo>::value,
"is_trivially_move_assignable");
}
I think it should compile fine, at least according to my reading of 12.8/12:
> A copy/move constructor for class X is trivial if (...)
> - class X has no non-static data members of volatile-qualified type
and 12.8/25:
> A copy/move assignment operator for class X is trivial if (...)
> - class X has no non-static data members of volatile-qualified type
These bullets were introduced by the resolution of CWG496.
--
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/20140925/5264140e/attachment.html>
More information about the llvm-bugs
mailing list