我有一些具有以下声明的遗留 C++ 代码(用于使用 GNU g++ 2.95.3 编译) std::basic_string<char,string_char_traits<char>,malloc_alloc> x;
头文件是
#include <std/bastring.h>
现在,我正在迁移到 GU g++ 4.9,我收到此错误:1.std/bastring.h
未找到 2. 当我更改 #include <std/bastring.h>
as#include <string>
时,我收到以下错误:
error: 'string_char_traits' was not declared in this scope
std::basic_string<char,string_char_traits<char>,malloc_alloc> x;
error: template argument 2 is invalid
std::basic_string<char,string_char_traits<char>,malloc_alloc> x;
error: expected unqualified-id before ',' token
std::basic_string<char,string_char_traits<char>,malloc_alloc> x;
^
需要指导/帮助以使其在 GNU g++ 4.9 下可编译