mirror of
https://github.com/jezhiggins/arabica
synced 2025-02-06 20:46:18 +01:00
Corrected MSC_VER ifdefs for VC++.Net
This commit is contained in:
parent
9bb5eba823
commit
71dbe82062
4 changed files with 17 additions and 17 deletions
|
@ -10,7 +10,7 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#ifdef _MSC_VER
|
#if!(_MSC_VER < 1300)
|
||||||
#include <minmax.h>
|
#include <minmax.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ bool convert_bufadaptor<charT, traitsT, externalCharT, externalTraitsT>::flushOu
|
||||||
|
|
||||||
bool ok(true);
|
bool ok(true);
|
||||||
const std::codecvt<charT, char, state_t>& cvt =
|
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());
|
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
|
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())
|
if(!inBuffer_.capacity())
|
||||||
growInBuffer();
|
growInBuffer();
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if!(_MSC_VER < 1300)
|
||||||
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
|
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
|
||||||
#else
|
#else
|
||||||
size_t pbCount = min(gptr() - eback(), pbSize_);
|
size_t pbCount = min(gptr() - eback(), pbSize_);
|
||||||
|
@ -181,7 +181,7 @@ convert_bufadaptor<charT, traitsT, externalCharT, externalTraitsT>::int_type con
|
||||||
pbCount*sizeof(charT));
|
pbCount*sizeof(charT));
|
||||||
|
|
||||||
const std::codecvt<charT, char, state_t>& cvt =
|
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());
|
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
|
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
|
||||||
|
|
|
@ -58,11 +58,11 @@ public:
|
||||||
explicit basic_iconvertstream(ios_base::openmode mode = in) :
|
explicit basic_iconvertstream(ios_base::openmode mode = in) :
|
||||||
std::basic_istream<charT, traitsT>( 0 ),
|
std::basic_istream<charT, traitsT>( 0 ),
|
||||||
stringbuf_(mode | in)
|
stringbuf_(mode | in)
|
||||||
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
|
{ istreamT::init( &stringbuf_ ); }
|
||||||
explicit basic_iconvertstream(const stringT& str, ios_base::openmode mode = in)
|
explicit basic_iconvertstream(const stringT& str, ios_base::openmode mode = in)
|
||||||
: std::basic_istream<charT, traitsT>(0), stringbuf_(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);
|
str(str);
|
||||||
}
|
}
|
||||||
virtual ~basic_iconvertstream()
|
virtual ~basic_iconvertstream()
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
void str(const fromStringT& str)
|
void str(const fromStringT& str)
|
||||||
{
|
{
|
||||||
// do conversion
|
// do conversion
|
||||||
#ifndef _MSC_VER
|
#if !(_MSC_VER < 1300)
|
||||||
const std::codecvt<charT, fromCharT, typename traitsT::state_type>& cvt =
|
const std::codecvt<charT, fromCharT, typename traitsT::state_type>& cvt =
|
||||||
std::use_facet<std::codecvt<charT, fromCharT, typename traitsT::state_type> >(this->getloc());
|
std::use_facet<std::codecvt<charT, fromCharT, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
|
@ -127,7 +127,7 @@ private:
|
||||||
stringT no_conversion(const fromStringT& str)
|
stringT no_conversion(const fromStringT& str)
|
||||||
{
|
{
|
||||||
stringT dest;
|
stringT dest;
|
||||||
#ifndef _MSC_VER
|
#if!(_MSC_VER < 1300)
|
||||||
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
||||||
#else
|
#else
|
||||||
// hack around pre-Standard library
|
// hack around pre-Standard library
|
||||||
|
@ -155,7 +155,7 @@ public:
|
||||||
explicit basic_oconvertstream(ios_base::openmode mode = out) :
|
explicit basic_oconvertstream(ios_base::openmode mode = out) :
|
||||||
std::basic_ostream<charT, traitsT>( 0 ),
|
std::basic_ostream<charT, traitsT>( 0 ),
|
||||||
stringbuf_(mode | out)
|
stringbuf_(mode | out)
|
||||||
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
|
{ ostreamT::init( &stringbuf_ ); }
|
||||||
explicit basic_oconvertstream(const stringT& str, ios_base::openmode mode = out) :
|
explicit basic_oconvertstream(const stringT& str, ios_base::openmode mode = out) :
|
||||||
std::basic_ostream<charT, traitsT>( 0 ),
|
std::basic_ostream<charT, traitsT>( 0 ),
|
||||||
stringbuf_(str, mode | out)
|
stringbuf_(str, mode | out)
|
||||||
|
@ -178,7 +178,7 @@ public:
|
||||||
return out;
|
return out;
|
||||||
|
|
||||||
// convert it here
|
// convert it here
|
||||||
#ifndef _MSC_VER
|
#if !(_MSC_VER < 1300)
|
||||||
const std::codecvt<charT, toCharT, typename traitsT::state_type>& cvt =
|
const std::codecvt<charT, toCharT, typename traitsT::state_type>& cvt =
|
||||||
std::use_facet<std::codecvt<charT, toCharT, typename traitsT::state_type> >(this->getloc());
|
std::use_facet<std::codecvt<charT, toCharT, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
|
@ -229,7 +229,7 @@ private:
|
||||||
toStringT no_conversion(const stringT& str)
|
toStringT no_conversion(const stringT& str)
|
||||||
{
|
{
|
||||||
toStringT dest;
|
toStringT dest;
|
||||||
#ifndef _MSC_VER
|
#if!(_MSC_VER < 1300)
|
||||||
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
||||||
#else
|
#else
|
||||||
for(typename stringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
for(typename stringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define ISO8859_1utf8_codecvtH
|
#define ISO8859_1utf8_codecvtH
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if(_MSC_VER < 1300)
|
||||||
namespace std {
|
namespace std {
|
||||||
typedef ::mbstate_t mbstate_t;
|
typedef ::mbstate_t mbstate_t;
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,7 +269,7 @@ bool basic_socketbuf<charT, traitsT>::writeSocket()
|
||||||
|
|
||||||
bool ok(true);
|
bool ok(true);
|
||||||
const std::codecvt<charT, char, state_t>& cvt =
|
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());
|
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
|
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())
|
if(!inBuffer_.capacity())
|
||||||
growInBuffer();
|
growInBuffer();
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if!(_MSC_VER < 1300)
|
||||||
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
|
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
|
||||||
#else
|
#else
|
||||||
size_t pbCount = min(gptr() - eback(), pbSize_);
|
size_t pbCount = min(gptr() - eback(), pbSize_);
|
||||||
|
@ -336,7 +336,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
|
||||||
pbCount*sizeof(charT));
|
pbCount*sizeof(charT));
|
||||||
|
|
||||||
const std::codecvt<charT, char, state_t>& cvt =
|
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());
|
std::use_facet<std::codecvt<charT, char, typename traitsT::state_type> >(this->getloc());
|
||||||
#else
|
#else
|
||||||
std::use_facet(this->getloc(), (std::codecvt<charT, char, traitsT::state_type>*)0, true);
|
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() :
|
basic_socketstream<charT, traitsT>::basic_socketstream() :
|
||||||
std::basic_iostream<charT, traitsT>( 0 )
|
std::basic_iostream<charT, traitsT>( 0 )
|
||||||
{
|
{
|
||||||
std::basic_ios<charT,traitsT>::init( &sockbuf );
|
init( &sockbuf );
|
||||||
} // basic_socketstream
|
} // basic_socketstream
|
||||||
|
|
||||||
template<class charT, class traitsT>
|
template<class charT, class traitsT>
|
||||||
basic_socketstream<charT, traitsT>::basic_socketstream(const char* hostname, int port) :
|
basic_socketstream<charT, traitsT>::basic_socketstream(const char* hostname, int port) :
|
||||||
std::basic_iostream<charT, traitsT>( 0 )
|
std::basic_iostream<charT, traitsT>( 0 )
|
||||||
{
|
{
|
||||||
std::basic_ios<charT,traitsT>::init( &sockbuf );
|
init( &sockbuf );
|
||||||
open(hostname, port);
|
open(hostname, port);
|
||||||
} // basic_socketstream
|
} // basic_socketstream
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue