Re: tags can't support VC's C++ std? but MinGW is OK!
Posted: Fri Dec 04, 2009 8:55 pm
For me it shows everything.
Which VC are u using?
Eran
Which VC are u using?
Eran
Code: Select all
// string standard header
#pragma once
#ifndef _STRING_
#define _STRING_
#ifndef RC_INVOKED
#include <istream>
#pragma pack(push,_CRT_PACKING)
#pragma warning(push,3)
#pragma warning(disable: 4189)
#pragma warning(disable: 4172)
_STD_BEGIN
// basic_string TEMPLATE OPERATORS
template<class _Elem,
class _Traits,
class _Alloc> inline
basic_string<_Elem, _Traits, _Alloc> operator+(
const basic_string<_Elem, _Traits, _Alloc>& _Left,
const basic_string<_Elem, _Traits, _Alloc>& _Right)
{ // return string + string
basic_string<_Elem, _Traits, _Alloc> _Ans;
_Ans.reserve(_Left.size() + _Right.size());
_Ans += _Left;
_Ans += _Right;
return (_Ans);
}
template<class _Elem,
class _Traits,
class _Alloc> inline
basic_string<_Elem, _Traits, _Alloc> operator+(
const _Elem *_Left,
const basic_string<_Elem, _Traits, _Alloc>& _Right)
{ // return NTCS + string
basic_string<_Elem, _Traits, _Alloc> _Ans;
_Ans.reserve(_Traits::length(_Left) + _Right.size());
_Ans += _Left;
_Ans += _Right;
return (_Ans);
}
............................
inline wstring to_wstring(long double _Val)
{ // convert long double to wstring
wchar_t _Buf[_MAX_EXP_DIG + _MAX_SIG_DIG + 64];
_CSTD swprintf(_Buf,sizeof (_Buf) / sizeof (_Buf[0]),
L"%Lg", _Val);
return (wstring(_Buf));
}
#endif /* _HAS_CPP0X */
_STD_END
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _STRING */
/*
* Copyright (c) 1992-2009 by P.J. Plauger. ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
V5.20:0009 */
Code: Select all
C:\Program Files\Microsoft Visual Studio 9.0\VC\include
Code: Select all
#include <stdio.h>
#include <string>
int main(int argc, char **argv)
{
std::basic_string<wchar_t> s;
printf("hello world\n");
return 0;
}