Added new config macros:

BOOST_NO_STD_WSTREAMBUF
	BOOST_NO_LONG_LONG_NUMERIC_LIMITS
	BOOST_NO_MS_INT64_NUMERIC_LIMITS


[SVN r14514]
This commit is contained in:
John Maddock
2002-07-18 11:10:04 +00:00
parent 113cded49d
commit 5c7f8b9290
12 changed files with 1412 additions and 390 deletions

1406
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// MACRO: BOOST_NO_MS_INT64_NUMERIC_LIMITS
// TITLE: std::numeric_limits<__int64>
// DESCRIPTION: The C++ implementation does not provide the a specialisation
// for std::numeric_limits<__int64>.
#include <limits>
namespace boost_no_ms_int64_numeric_limits{
int test()
{
if(0 == std::numeric_limits<__int64>::is_specialized) return -1;
if(0 == std::numeric_limits<unsigned __int64>::is_specialized) return -1;
return 0;
}
}

View File

@ -0,0 +1,26 @@
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// MACRO: BOOST_NO_LONG_LONG_NUMERIC_LIMITS
// TITLE: std::numeric_limits<long long>
// DESCRIPTION: The C++ implementation does not provide the a specialisation
// for std::numeric_limits<long long>.
#include <limits>
namespace boost_no_long_long_numeric_limits{
int test()
{
if(0 == std::numeric_limits<long long>::is_specialized) return -1;
if(0 == std::numeric_limits<unsigned long long>::is_specialized) return -1;
return 0;
}
}

View File

@ -0,0 +1,102 @@
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// MACRO: BOOST_NO_STD_WSTREAMBUF
// TITLE: std::basic_streambuf<wchar_t>
// DESCRIPTION: The standard library lacks std::basic_streambuf<wchar_t>.
#include <iostream>
namespace boost_no_std_wstreambuf{
template <class charT,
class traits = ::std::char_traits<charT> >
class parser_buf : public ::std::basic_streambuf<charT, traits>
{
typedef ::std::basic_streambuf<charT, traits> base_type;
typedef typename base_type::int_type int_type;
typedef typename base_type::char_type char_type;
typedef typename base_type::pos_type pos_type;
typedef ::std::streamsize streamsize;
typedef typename base_type::off_type off_type;
public:
parser_buf() : base_type() { setbuf(0, 0); }
const charT* getnext() { return this->gptr(); }
protected:
std::basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n);
typename parser_buf<charT, traits>::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which);
typename parser_buf<charT, traits>::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which);
private:
parser_buf& operator=(const parser_buf&);
parser_buf(const parser_buf&);
};
template<class charT, class traits>
std::basic_streambuf<charT, traits>*
parser_buf<charT, traits>::setbuf(char_type* s, streamsize n)
{
this->setg(s, s, s + n);
return this;
}
template<class charT, class traits>
typename parser_buf<charT, traits>::pos_type
parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)
{
typedef typename parser_buf<charT, traits>::pos_type pos_type;
if(which & ::std::ios_base::out)
return pos_type(off_type(-1));
std::ptrdiff_t size = this->egptr() - this->eback();
std::ptrdiff_t pos = this->gptr() - this->eback();
charT* g = this->eback();
switch(way)
{
case ::std::ios_base::beg:
if((off < 0) || (off > size))
return pos_type(off_type(-1));
else
this->setg(g, g + off, g + size);
case ::std::ios_base::end:
if((off < 0) || (off > size))
return pos_type(off_type(-1));
else
this->setg(g, g + size - off, g + size);
case ::std::ios_base::cur:
{
std::ptrdiff_t newpos = pos + off;
if((newpos < 0) || (newpos > size))
return pos_type(off_type(-1));
else
this->setg(g, g + newpos, g + size);
}
}
return static_cast<pos_type>(this->gptr() - this->eback());
}
template<class charT, class traits>
typename parser_buf<charT, traits>::pos_type
parser_buf<charT, traits>::seekpos(pos_type sp, ::std::ios_base::openmode which)
{
if(which & ::std::ios_base::out)
return pos_type(off_type(-1));
std::ptrdiff_t size = this->egptr() - this->eback();
charT* g = this->eback();
if(sp <= size)
{
this->setg(g, g + ::std::streamsize(sp), g + size);
}
return pos_type(off_type(-1));
}
int test()
{
return 0;
}
template class parser_buf<char>;
template class parser_buf<wchar_t>;
}

View File

@ -10,7 +10,7 @@
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_*.cxx on
// Sun May 19 12:54:38 2002
// Thu Jul 18 11:26:48 2002
#include <boost/config.hpp>
#define BOOST_INCLUDE_MAIN
@ -82,6 +82,11 @@ namespace boost_no_explicit_function_template_arguments = empty_boost;
#else
namespace boost_no_function_template_ordering = empty_boost;
#endif
#ifndef BOOST_NO_MS_INT64_NUMERIC_LIMITS
#include "boost_no_i64_limits.cxx"
#else
namespace boost_no_ms_int64_numeric_limits = empty_boost;
#endif
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
#include "boost_no_inline_memb_init.cxx"
#else
@ -107,6 +112,11 @@ namespace boost_no_limits = empty_boost;
#else
namespace boost_no_limits_compile_time_constants = empty_boost;
#endif
#ifndef BOOST_NO_LONG_LONG_NUMERIC_LIMITS
#include "boost_no_ll_limits.cxx"
#else
namespace boost_no_long_long_numeric_limits = empty_boost;
#endif
#ifndef BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
#include "boost_no_mem_func_spec.cxx"
#else
@ -197,6 +207,11 @@ namespace boost_no_std_output_iterator_assign = empty_boost;
#else
namespace boost_no_std_use_facet = empty_boost;
#endif
#ifndef BOOST_NO_STD_WSTREAMBUF
#include "boost_no_std_wstreambuf.cxx"
#else
namespace boost_no_std_wstreambuf = empty_boost;
#endif
#ifndef BOOST_NO_STD_WSTRING
#include "boost_no_std_wstring.cxx"
#else
@ -367,6 +382,7 @@ int test_main( int, char *[] )
BOOST_TEST(0 == boost_no_swprintf::test());
BOOST_TEST(0 == boost_no_stdc_namespace::test());
BOOST_TEST(0 == boost_no_std_wstring::test());
BOOST_TEST(0 == boost_no_std_wstreambuf::test());
BOOST_TEST(0 == boost_no_std_use_facet::test());
BOOST_TEST(0 == boost_no_std_output_iterator_assign::test());
BOOST_TEST(0 == boost_no_std_min_max::test());
@ -385,11 +401,13 @@ int test_main( int, char *[] )
BOOST_TEST(0 == boost_no_member_template_friends::test());
BOOST_TEST(0 == boost_no_member_template_keyword::test());
BOOST_TEST(0 == boost_no_member_function_specializations::test());
BOOST_TEST(0 == boost_no_long_long_numeric_limits::test());
BOOST_TEST(0 == boost_no_limits_compile_time_constants::test());
BOOST_TEST(0 == boost_no_limits::test());
BOOST_TEST(0 == boost_no_templated_iterator_constructors::test());
BOOST_TEST(0 == boost_no_integral_int64_t::test());
BOOST_TEST(0 == boost_no_inclass_member_initialization::test());
BOOST_TEST(0 == boost_no_ms_int64_numeric_limits::test());
BOOST_TEST(0 == boost_no_function_template_ordering::test());
BOOST_TEST(0 == boost_no_explicit_function_template_arguments::test());
BOOST_TEST(0 == boost_no_exceptions::test());

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_MS_INT64_NUMERIC_LIMITS
// This file should not compile, if it does then
// BOOST_NO_MS_INT64_NUMERIC_LIMITS need not be defined.
// see boost_no_i64_limits.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_i64_limits.cxx on
// Thu Jul 18 11:26:48 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifdef BOOST_NO_MS_INT64_NUMERIC_LIMITS
#include "boost_no_i64_limits.cxx"
#else
#error "this file should not compile"
#endif
int cpp_main( int, char *[] )
{
return boost_no_ms_int64_numeric_limits::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_MS_INT64_NUMERIC_LIMITS
// This file should compile, if it does not then
// BOOST_NO_MS_INT64_NUMERIC_LIMITS needs to be defined.
// see boost_no_i64_limits.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_i64_limits.cxx on
// Thu Jul 18 11:26:48 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifndef BOOST_NO_MS_INT64_NUMERIC_LIMITS
#include "boost_no_i64_limits.cxx"
#else
namespace boost_no_ms_int64_numeric_limits = empty_boost;
#endif
int cpp_main( int, char *[] )
{
return boost_no_ms_int64_numeric_limits::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_LONG_LONG_NUMERIC_LIMITS
// This file should not compile, if it does then
// BOOST_NO_LONG_LONG_NUMERIC_LIMITS need not be defined.
// see boost_no_ll_limits.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_ll_limits.cxx on
// Thu Jul 18 11:26:48 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifdef BOOST_NO_LONG_LONG_NUMERIC_LIMITS
#include "boost_no_ll_limits.cxx"
#else
#error "this file should not compile"
#endif
int cpp_main( int, char *[] )
{
return boost_no_long_long_numeric_limits::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_LONG_LONG_NUMERIC_LIMITS
// This file should compile, if it does not then
// BOOST_NO_LONG_LONG_NUMERIC_LIMITS needs to be defined.
// see boost_no_ll_limits.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_ll_limits.cxx on
// Thu Jul 18 11:26:48 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifndef BOOST_NO_LONG_LONG_NUMERIC_LIMITS
#include "boost_no_ll_limits.cxx"
#else
namespace boost_no_long_long_numeric_limits = empty_boost;
#endif
int cpp_main( int, char *[] )
{
return boost_no_long_long_numeric_limits::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_STD_WSTREAMBUF
// This file should not compile, if it does then
// BOOST_NO_STD_WSTREAMBUF need not be defined.
// see boost_no_std_wstreambuf.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_std_wstreambuf.cxx on
// Wed Jul 17 12:54:32 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifdef BOOST_NO_STD_WSTREAMBUF
#include "boost_no_std_wstreambuf.cxx"
#else
#error "this file should not compile"
#endif
int cpp_main( int, char *[] )
{
return boost_no_std_wstreambuf::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_NO_STD_WSTREAMBUF
// This file should compile, if it does not then
// BOOST_NO_STD_WSTREAMBUF needs to be defined.
// see boost_no_std_wstreambuf.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_no_std_wstreambuf.cxx on
// Wed Jul 17 12:54:32 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifndef BOOST_NO_STD_WSTREAMBUF
#include "boost_no_std_wstreambuf.cxx"
#else
namespace boost_no_std_wstreambuf = empty_boost;
#endif
int cpp_main( int, char *[] )
{
return boost_no_std_wstreambuf::test();
}

View File

@ -31,6 +31,8 @@ run libs/config/test/no_exp_func_tem_arg_pass.cpp
link-fail libs/config/test/no_exp_func_tem_arg_fail.cpp
run libs/config/test/no_func_tmp_order_pass.cpp
link-fail libs/config/test/no_func_tmp_order_fail.cpp
run libs/config/test/no_i64_limits_pass.cpp
link-fail libs/config/test/no_i64_limits_fail.cpp
run libs/config/test/no_inline_memb_init_pass.cpp
link-fail libs/config/test/no_inline_memb_init_fail.cpp
run libs/config/test/no_integral_int64_t_pass.cpp
@ -41,6 +43,8 @@ run libs/config/test/no_limits_pass.cpp
link-fail libs/config/test/no_limits_fail.cpp
run libs/config/test/no_limits_const_exp_pass.cpp
link-fail libs/config/test/no_limits_const_exp_fail.cpp
run libs/config/test/no_ll_limits_pass.cpp
link-fail libs/config/test/no_ll_limits_fail.cpp
run libs/config/test/no_mem_func_spec_pass.cpp
link-fail libs/config/test/no_mem_func_spec_fail.cpp
run libs/config/test/no_mem_tem_keyword_pass.cpp
@ -77,6 +81,8 @@ run libs/config/test/no_std_oi_assign_pass.cpp
link-fail libs/config/test/no_std_oi_assign_fail.cpp
run libs/config/test/no_std_use_facet_pass.cpp
link-fail libs/config/test/no_std_use_facet_fail.cpp
run libs/config/test/no_std_wstreambuf_pass.cpp
link-fail libs/config/test/no_std_wstreambuf_fail.cpp
run libs/config/test/no_std_wstring_pass.cpp
link-fail libs/config/test/no_std_wstring_fail.cpp
run libs/config/test/no_stdc_namespace_pass.cpp