Probabilmente stai compilando in modalità C++98/C++03; che compilatore stai usando (e in particolare, che versione)?