[Bug c++/58109] alignas() fails to compile with constant expression
rs2740 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Dec 20 01:11:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58109
TC <rs2740 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rs2740 at gmail dot com
--- Comment #5 from TC <rs2740 at gmail dot com> ---
The test cases in this bug appear to work with GCC 4.9.0 or later; however a
somewhat similar example from http://stackoverflow.com/q/34376921/2756719 fails
to compile:
template <typename T>
struct Base {
constexpr static int Align_ = alignof(T);
};
template <typename T>
struct Derived : Base<T> {
using Base_ = Base<T>;
using Base_::Align_;
alignas(Align_) char buf[1];
};
More information about the Gcc-bugs
mailing list