[Bug c++/56859] New: alignas() fails in template
wd11 at leicester dot ac.uk
gcc-bugzilla@gcc.gnu.org
Sat Apr 6 20:38:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56859
Bug #: 56859
Summary: alignas() fails in template
Classification: Unclassified
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: wd11@leicester.ac.uk
The alignas attribute fails when used with a template-dependent integer
constant, as in
template<typename T>
struct alignas(2*sizeof(T)) foo { /* ... */ };
when gcc complains that "error: requested alignment is not an integer constant"
(no problem with clang++ 3.2). In a non-templated context, this construct
compiles fine.
More information about the Gcc-bugs
mailing list