我正在使用 icpc(非可选)并且我正在使用 -std=c++0x 进行编译,因此我可以使用lambas。
但是,当我这样做时,它会使用 gcc stdlib 创建 havok,其中一个支持另一个不支持的功能。
我试过定义
__GXX_EXPERIMENTAL_CXX0X__
但这没有帮助。
因此,理想情况下,我要求的是能够将 c++0x 语言功能与 C++03 标准库一起使用。
海合会 4.6
国际刑事法院 12.1]
编辑错误示例:
/usr/include/c++/4.6.2/type_traits(74): error: identifier "constexpr" is undefined
static constexpr _Tp value = __v;
^
/usr/include/c++/4.6.2/type_traits(74): error: expected a ";"
static constexpr _Tp value = __v;
^
/usr/include/c++/4.6.2/type_traits(75): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name
typedef _Tp value_type;
^
/usr/include/c++/4.6.2/type_traits(76): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name
typedef integral_constant<_Tp, __v> type;
^
/usr/include/c++/4.6.2/type_traits(77): error: identifier "constexpr" is undefined
constexpr operator value_type() { return value; }
^
/usr/include/c++/4.6.2/type_traits(87): error: identifier "constexpr" is undefined
constexpr _Tp integral_constant<_Tp, __v>::value;