-1
4

1 回答 1

1

It's best to migrate from TR1, which is an informal proposal from 2006, to C++11, which incorporated most of TR1 verbatim (meaning that a TR1 program is probably converted C++11 if you just remove the tr1::s).

Although the interfaces are mostly the same, the TR1 implementation is separate. So it's basically frozen in time, and new compiler quirks might cause it to break. Or on other platforms, they might alias TR1 features forward to "native" C++11 meaning that tr1:: classes might have differences from the actual TR1 spec.

On GCC, after removing tr1::, remove tr1/ from the headers and pass -std=c++11 on the command line.

于 2013-01-06T09:20:27.470 回答