Corrected MSC_VER ifdefs for VC++.Net

This commit is contained in:
jez_higgins 2003-03-20 16:22:17 +00:00
parent 9bb5eba823
commit 71dbe82062
4 changed files with 17 additions and 17 deletions

View file

@ -10,7 +10,7 @@
#include <ostream>
#include <vector>
#include <algorithm>
#ifdef _MSC_VER
#if!(_MSC_VER < 1300)
#include <minmax.h>
#endif
@ -126,7 +126,7 @@ bool convert_bufadaptor<charT, traitsT, externalCharT, externalTraitsT>::flushOu
bool ok(true);
const std::codecvt<charT, char, state_t>& cvt =
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
@ -171,7 +171,7 @@ convert_bufadaptor<charT, traitsT, externalCharT, externalTraitsT>::int_type con
if(!inBuffer_.capacity())
growInBuffer();
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
#else
size_t pbCount = min(gptr() - eback(), pbSize_);
@ -181,7 +181,7 @@ convert_bufadaptor<charT, traitsT, externalCharT, externalTraitsT>::int_type con
pbCount*sizeof(charT));
const std::codecvt<charT, char, state_t>& cvt =
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);

View file

@ -58,11 +58,11 @@ public:
explicit basic_iconvertstream(ios_base::openmode mode = in) :
std::basic_istream<charT, traitsT>( 0 ),
stringbuf_(mode | in)
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
{ istreamT::init( &stringbuf_ ); }
explicit basic_iconvertstream(const stringT& str, ios_base::openmode mode = in)
: std::basic_istream<charT, traitsT>(0), stringbuf_(mode | in)
{
std::basic_ios<charT,traitsT>::init( &stringbuf_ ); // istreamT::rdbuf(&stringbuf_);
istreamT::init( &stringbuf_ ); // istreamT::rdbuf(&stringbuf_);
str(str);
}
virtual ~basic_iconvertstream()
@ -81,7 +81,7 @@ public:
void str(const fromStringT& str)
{
// do conversion
#ifndef _MSC_VER
#if !(_MSC_VER < 1300)
const std::codecvt<charT, fromCharT, typename traitsT::state_type>& cvt =
std::use_facet<std::codecvt<charT, fromCharT, typename traitsT::state_type> >(this->getloc());
#else
@ -127,7 +127,7 @@ private:
stringT no_conversion(const fromStringT& str)
{
stringT dest;
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
std::copy(str.begin(), str.end(), std::back_inserter(dest));
#else
// hack around pre-Standard library
@ -155,7 +155,7 @@ public:
explicit basic_oconvertstream(ios_base::openmode mode = out) :
std::basic_ostream<charT, traitsT>( 0 ),
stringbuf_(mode | out)
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
{ ostreamT::init( &stringbuf_ ); }
explicit basic_oconvertstream(const stringT& str, ios_base::openmode mode = out) :
std::basic_ostream<charT, traitsT>( 0 ),
stringbuf_(str, mode | out)
@ -178,7 +178,7 @@ public:
return out;
// convert it here
#ifndef _MSC_VER
#if !(_MSC_VER < 1300)
const std::codecvt<charT, toCharT, typename traitsT::state_type>& cvt =
std::use_facet<std::codecvt<charT, toCharT, typename traitsT::state_type> >(this->getloc());
#else
@ -229,7 +229,7 @@ private:
toStringT no_conversion(const stringT& str)
{
toStringT dest;
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
std::copy(str.begin(), str.end(), std::back_inserter(dest));
#else
for(typename stringT::const_iterator i = str.begin(); i != str.end(); ++i)

View file

@ -2,7 +2,7 @@
#define ISO8859_1utf8_codecvtH
#include <locale>
#ifdef _MSC_VER
#if(_MSC_VER < 1300)
namespace std {
typedef ::mbstate_t mbstate_t;
}

View file

@ -269,7 +269,7 @@ bool basic_socketbuf<charT, traitsT>::writeSocket()
bool ok(true);
const std::codecvt<charT, char, state_t>& cvt =
#ifndef _MSC_VER
#if !(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
@ -326,7 +326,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
if(!inBuffer_.capacity())
growInBuffer();
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
#else
size_t pbCount = min(gptr() - eback(), pbSize_);
@ -336,7 +336,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
pbCount*sizeof(charT));
const std::codecvt<charT, char, state_t>& cvt =
#ifndef _MSC_VER
#if!(_MSC_VER < 1300)
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
#else
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
@ -440,14 +440,14 @@ template<class charT, class traitsT>
basic_socketstream<charT, traitsT>::basic_socketstream() :
std::basic_iostream<charT, traitsT>( 0 )
{
std::basic_ios<charT,traitsT>::init( &sockbuf );
init( &sockbuf );
} // basic_socketstream
template<class charT, class traitsT>
basic_socketstream<charT, traitsT>::basic_socketstream(const char* hostname, int port) :
std::basic_iostream<charT, traitsT>( 0 )
{
std::basic_ios<charT,traitsT>::init( &sockbuf );
init( &sockbuf );
open(hostname, port);
} // basic_socketstream