Add Vincete Botet's patches for new BOOST_NO_NUMERIC_LIMITS_LOWEST macro.

Disabled BOOST_HAS_NL_TYPES macro for cygwin - it lies about being XSI conforming :-(

[SVN r65594]
This commit is contained in:
John Maddock
2010-09-26 09:30:38 +00:00
parent c02ec6995d
commit 0e321900b2
17 changed files with 92 additions and 4 deletions

View File

@@ -533,6 +533,23 @@
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_NUMERIC_LIMITS_LOWEST</span></code>
</p>
</td>
<td>
<p>
Standard library
</p>
</td>
<td>
<p>
Static function <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">lowest</span><span class="special">()</span></code> is not available for use.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS</span></code>

View File

@@ -28,7 +28,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright &#169; 2001 -2007 Beman Dawes, Vesa Karvonen, John Maddock</p></div>
<div><div class="legalnotice">
<a name="id978573"></a><p>
<a name="id1010243"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
@@ -950,7 +950,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: August 17, 2010 at 09:09:56 GMT</small></p></td>
<td align="left"><p><small>Last revised: September 26, 2010 at 09:24:20 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@@ -144,6 +144,9 @@ The C++ implementation does not provide the `<limits>` header. Never check for
this symbol in library code; always include `<boost/limits.hpp>`, which
guarantees to provide `std::numeric_limits`.
]]
[[`BOOST_NO_NUMERIC_LIMITS_LOWEST`][Standard library][
Static function `numeric_limits<T>::lowest()` is not available for use.
]]
[[`BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS`][Standard library][
Constants such as `numeric_limits<T>::is_signed` are not available for use
at compile-time.

View File

@@ -41,6 +41,13 @@
// boilerplate code:
#include <boost/config/posix_features.hpp>
//
// Cygwin lies about XSI conformance, there is no nl_types.h:
//
#ifdef BOOST_HAS_NL_TYPES_H
# undef BOOST_HAS_NL_TYPES_H
#endif

View File

@@ -125,6 +125,7 @@
# define BOOST_NO_0X_HDR_MUTEX
# define BOOST_NO_0X_HDR_RATIO
# define BOOST_NO_0X_HDR_THREAD
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#ifdef _CPPLIB_VER
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER

View File

@@ -58,6 +58,7 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
//
// Intrinsic type_traits support.

View File

@@ -115,6 +115,12 @@
# define BOOST_NO_0X_HDR_THREAD
#endif
// C++0x features in GCC 4.5.0 and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#endif
// C++0x headers not yet implemented
//
# define BOOST_NO_0X_HDR_CODECVT

View File

@@ -47,6 +47,7 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#define BOOST_STDLIB "Modena C++ standard library"

View File

@@ -71,6 +71,7 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)

View File

@@ -177,4 +177,5 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST

View File

@@ -130,6 +130,7 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#define BOOST_STDLIB "SGI standard library"

View File

@@ -225,6 +225,7 @@ namespace boost { using std::min; using std::max; }
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)

View File

@@ -37,6 +37,7 @@
# define BOOST_NO_STD_UNORDERED // deprecated; see following
# define BOOST_NO_0X_HDR_UNORDERED_MAP
# define BOOST_NO_0X_HDR_UNORDERED_SET
# define BOOST_NO_NUMERIC_LIMITS_LOWEST
#define BOOST_STDLIB "Visual Age default standard library"

View File

@@ -1,7 +1,7 @@
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Tue Aug 17 09:59:01 2010
# This file was automatically generated on Sat Sep 25 16:53:42 2010
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -367,6 +367,9 @@ test-suite "BOOST_NO_LIMITS" :
test-suite "BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS" :
[ run ../no_limits_const_exp_pass.cpp ]
[ compile-fail ../no_limits_const_exp_fail.cpp ] ;
test-suite "BOOST_NO_NUMERIC_LIMITS_LOWEST" :
[ run ../no_limits_lowest_pass.cpp ]
[ compile-fail ../no_limits_lowest_fail.cpp ] ;
test-suite "BOOST_NO_LONG_LONG_NUMERIC_LIMITS" :
[ run ../no_ll_limits_pass.cpp ]
[ compile-fail ../no_ll_limits_fail.cpp ] ;

View File

@@ -0,0 +1,31 @@
// (C) Copyright Vicente J. Botet Escriba 2010.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for most recent version.
// MACRO: BOOST_NO_NUMERIC_LIMITS_LOWEST
// TITLE: static function lowest() in numeric_limits class <limits>
// DESCRIPTION: static function numeric_limits<T>::lowest() are not available for use.
#include <limits>
namespace boost_no_numeric_limits_lowest{
int f()
{
// this is never called, it just has to compile:
return std::numeric_limits<int>::lowest();
}
int test()
{
return 0;
}
}

View File

@@ -1026,6 +1026,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_MS_INT64_NUMERIC_LIMITS);
PRINT_MACRO(BOOST_NO_NESTED_FRIENDSHIP);
PRINT_MACRO(BOOST_NO_NULLPTR);
PRINT_MACRO(BOOST_NO_NUMERIC_LIMITS_LOWEST);
PRINT_MACRO(BOOST_NO_OPERATORS_IN_NAMESPACE);
PRINT_MACRO(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS);
PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_CONST);
@@ -1086,6 +1087,8 @@ void print_boost_macros()
// END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL);

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Tue Aug 17 09:59:01 2010
// This file was automatically generated on Sat Sep 25 16:53:42 2010
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@@ -342,6 +342,11 @@ namespace boost_no_limits = empty_boost;
#else
namespace boost_no_limits_compile_time_constants = empty_boost;
#endif
#ifndef BOOST_NO_NUMERIC_LIMITS_LOWEST
#include "boost_no_limits_lowest.ipp"
#else
namespace boost_no_numeric_limits_lowest = empty_boost;
#endif
#ifndef BOOST_NO_LONG_LONG_NUMERIC_LIMITS
#include "boost_no_ll_limits.ipp"
#else
@@ -1436,6 +1441,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_numeric_limits_lowest::test())
{
std::cerr << "Failed test for BOOST_NO_NUMERIC_LIMITS_LOWEST at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_long_long_numeric_limits::test())
{
std::cerr << "Failed test for BOOST_NO_LONG_LONG_NUMERIC_LIMITS at: " << __FILE__ << ":" << __LINE__ << std::endl;