This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56859] New: alignas() fails in template
- From: "wd11 at leicester dot ac.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Apr 2013 20:38:02 +0000
- Subject: [Bug c++/56859] New: alignas() fails in template
- Auto-submitted: auto-generated
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.