The following code does not compile:
using Type alignas(4) = int;
According to clause 7 of the standard I think it should:
alias-declaration: using identifier attribute-specifier-seqopt = type-id ;
[ [ attribute-list ] ]
alignas ( type-id ...opt)
alignas ( alignment-expression ...opt)
I use MSVC2013 and either the v120 or CTP_Nov2013 base platform toolset.
Both Microsoft compilers don't compile either. Is this the reason why yours doesn't compile (just like with no implicit move semantics generation)?
If so, is there an undocumented compiler switch like "Qoption,cpp,--alias_declaration"?
Based on reading the spec you mention it should be:
using A alignas(16) = int;
using A = int alignas(16);
Anyways, I just responded to similar thread you posted on typedef and looks like it's not supported or implemented and will file this with the developers. I"ll get back to you as soon as I've an update accordingly, appreciate much.
yes, I think the second form you mention (with alignas on the right) is legal because according to 8.1 (1) type-id can be:
type-specifier-seq noptr-abstract-declaratoropt[ constant-expressionopt ] attribute-specifier-seqopt
alias-declaration: using identifier attribute-specifier-seqopt = type-specifier attribute-specifier-seqopt ;