Compare commits

..

8 Commits

Author SHA1 Message Date
nobody 0fc4c6c156 This commit was manufactured by cvs2svn to create tag
'Version_1_27_0'.

[SVN r12749]
2002-02-07 13:33:59 +00:00
nobody c68281b772 This commit was manufactured by cvs2svn to create branch 'RC_1_27_0'.
[SVN r12739]
2002-02-06 03:32:50 +00:00
Dave Abrahams 0a560dd543 Suppress warnings for MinGW
[SVN r12588]
2002-01-30 20:02:11 +00:00
Beman Dawes 8cbbd7c551 Fix sstream config issue plus update license
[SVN r12378]
2002-01-20 20:08:46 +00:00
Beman Dawes 805d5df9cb remove tabs
[SVN r12357]
2002-01-19 15:49:53 +00:00
Jeremy Siek bd16c171e6 fixed lexical cast g++ sstream problem
[SVN r11592]
2001-11-05 16:43:43 +00:00
Beman Dawes 66235f4b9d Fix minor non-std HTML </a> nesting
[SVN r11589]
2001-11-05 16:32:27 +00:00
Beman Dawes 8c18776800 #include <cfloat> (Peter Schmid)
[SVN r10905]
2001-08-21 01:47:04 +00:00
4 changed files with 32 additions and 22 deletions
+1
View File
@@ -16,6 +16,7 @@
#include <iostream>
#include <climits>
#include <cfloat> // for DBL_MAX (Peter Schmid)
#include <boost/cast.hpp>
# if SCHAR_MAX == LONG_MAX
+4 -4
View File
@@ -121,7 +121,7 @@ namespace boost
// numeric_cast ------------------------------------------------------------//
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_SGI_CPP_LIMITS)
namespace detail
{
@@ -133,7 +133,7 @@ namespace boost
template <class T>
struct limits : std::numeric_limits<T>
{
static inline T min()
static inline T min()
# ifndef __GNUC__ // bug workaround courtesy Jens Maurer
{
return std::numeric_limits<T>::min() >= 0
@@ -144,7 +144,7 @@ namespace boost
# else
;
# endif
};
};
};
# ifdef __GNUC__ // bug workaround courtesy Jens Maurer
@@ -295,7 +295,7 @@ namespace boost
typedef std::numeric_limits<Source> arg_traits;
typedef detail::fixed_numeric_limits<Target> result_traits;
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_SGI_CPP_LIMITS)
// typedefs that act as compile time assertions
// (to be replaced by boost compile time assertions
// as and when they become available and are stable)
+20 -11
View File
@@ -13,11 +13,18 @@
// where: tested with MSVC 6.0, BCC 5.5, and g++ 2.91
#include <boost/config.hpp>
# ifndef BOOST_NO_STRINGSTREAM
# include <sstream>
# else
# include <strstream>
// Some sstream implementations are broken for the purposes of lexical cast.
# if defined(BOOST_NO_STRINGSTREAM)
# define BOOST_LEXICAL_CAST_USE_STRSTREAM
# endif
#ifdef BOOST_LEXICAL_CAST_USE_STRSTREAM
# include <strstream>
#else
# include <sstream>
#endif
#include <typeinfo>
namespace boost
@@ -39,10 +46,10 @@ namespace boost
template<typename Target, typename Source>
Target lexical_cast(Source arg)
{
# ifndef BOOST_NO_STRINGSTREAM
std::stringstream interpreter;
# else
# ifdef BOOST_LEXICAL_CAST_USE_STRSTREAM
std::strstream interpreter; // for out-of-the-box g++ 2.95.2
# else
std::stringstream interpreter;
# endif
Target result;
@@ -54,14 +61,16 @@ namespace boost
}
}
// Copyright Kevlin Henney, 2000. All rights reserved.
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
//
// Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives, and that no
// charge may be made for the software and its documentation except to cover
// cost of distribution.
// permissions notice appear in all copies and derivatives.
//
// This software is provided "as is" without express or implied warranty.
#ifdef BOOST_LEXICAL_CAST_USE_STRSTREAM
# undef BOOST_LEXICAL_CAST_USE_STRSTREAM
#endif
#endif
+7 -7
View File
@@ -12,13 +12,13 @@
<a href="../../boost/lexical_cast.hpp">boost/lexical_cast.hpp</a></h1>
<ul>
<li><a href="#motivation">Motivation</li>
<li></a><a href="#examples">Examples</li>
<li></a><a href="#synopsis">Synopsis</li>
<li></a><a href="#lexical_cast"><code>lexical_cast</code></li>
<li></a><a href="#bad_lexical_cast"><code>bad_lexical_cast</code></li>
<li></a><a href="#portability">Portability</li>
<li></a><a href="#future">Future directions</li>
<li><a href="#motivation">Motivation</a></li>
<li><a href="#examples">Examples</a></li>
<li><a href="#synopsis">Synopsis</a></li>
<li><a href="#lexical_cast"><code>lexical_cast</code></a></li>
<li><a href="#bad_lexical_cast"><code>bad_lexical_cast</code></a></li>
<li><a href="#portability">Portability</a></li>
<li><a href="#future">Future directions</a></li>
</ul>
<hr>