The expression is new int[]not valid with C ++ 11 (I have not tested C ++ 14).
Using the only []syntax required to copy the (implicitly convertible to) integral expression type between the brackets, indicating the desired size of the array.
Note that this size should not be constant: at the lower level of abstraction, this is how you allocate a dynamic array in C ++.
++ 11 ( N3290) §5.3.4/6:
" noptr-new-declarator (5.19) . noptr-new-declarator , , (12.3)
[]. [] (, ), .
, new std::vector (, , std::string).