// test.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xstring>
#include <memory>
class myAllocChar : public std::allocator<char>
{
};
typedef std::basic_string<char, std::char_traits<char>, myAllocChar> myString;
int _tmain(int argc, _TCHAR* argv[])
{
myString a = "abcdef";
myString b = a.substr(0,1);
return 0;
}
这段代码在vs2005-vs2010编译成功,vs2013编译失败,请问应该怎么改?