mirror of
https://github.com/boostorg/detail.git
synced 2025-06-27 21:11:07 +02:00
Compare commits
9 Commits
boost-1.27
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
2ed4dafddc | |||
28432648e0 | |||
e69140d3f3 | |||
00f6a9751a | |||
9663499093 | |||
d9d6a970cf | |||
5efbcbea28 | |||
01448d3373 | |||
15a5375b14 |
@ -13,6 +13,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_ALLOCATOR_HPP
|
||||
#define BOOST_DETAIL_ALLOCATOR_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstdlib>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
@ -259,7 +262,7 @@ public:
|
||||
void construct(pointer p, const T& val) const
|
||||
{ allocator_construct(p, val); }
|
||||
|
||||
void destroy(pointer __p) const
|
||||
void destroy(pointer p) const
|
||||
{ allocator_destroy(p); }
|
||||
};
|
||||
|
||||
@ -274,3 +277,4 @@ struct rebind_allocator
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
@ -60,10 +60,13 @@ namespace boost
|
||||
int result = 0; // quiet compiler warnings
|
||||
bool exception_thrown = true; // avoid setting result for each excptn type
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif
|
||||
result = function_object();
|
||||
exception_thrown = false;
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
// As a result of hard experience with strangely interleaved output
|
||||
@ -120,6 +123,7 @@ namespace boost
|
||||
|
||||
catch ( ... )
|
||||
{ detail::report_exception( out, "unknown exception", "" ); }
|
||||
#endif // BOOST_NO_EXCEPTIONS
|
||||
|
||||
if ( exception_thrown ) result = boost::exit_exception_failure;
|
||||
|
||||
@ -131,8 +135,9 @@ namespace boost
|
||||
<< "********** errors detected; see stdout for details ***********"
|
||||
<< std::endl;
|
||||
}
|
||||
#if !defined(BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE)
|
||||
else { out << std::flush << "no errors detected" << std::endl; }
|
||||
|
||||
#endif
|
||||
return result;
|
||||
} // catch_exceptions
|
||||
|
||||
|
@ -62,14 +62,10 @@
|
||||
# include <iterator>
|
||||
# include <cstddef>
|
||||
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR)
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
|
||||
# include <xtree>
|
||||
# include <deque>
|
||||
# include <list>
|
||||
# if 0 && defined(__ICL) // Re-enable this to pick up the Intel fixes where they left off
|
||||
# include <iosfwd>
|
||||
# include <memory>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
@ -110,7 +106,7 @@ template <> struct iterator_traits_select<true>
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef Ptr pointer;
|
||||
#ifdef BOOST_MSVC
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
// Keeps MSVC happy under certain circumstances. It seems class template default
|
||||
// arguments are partly instantiated even when not used when the class template
|
||||
// is the return type of a function template.
|
||||
@ -183,7 +179,7 @@ struct bad_output_iterator_select<false>
|
||||
};
|
||||
# endif
|
||||
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR)
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
|
||||
|
||||
// We'll sort iterator types into one of these classifications, from which we
|
||||
// can determine the difference_type, pointer, reference, and value_type
|
||||
@ -291,7 +287,7 @@ template <> struct iterator_traits_select<false>
|
||||
template <class Iterator>
|
||||
struct traits
|
||||
{
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR)
|
||||
# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
|
||||
typedef msvc_traits_select<(
|
||||
msvc_iterator_classification<Iterator>::value
|
||||
)>::template traits_<Iterator> inner_traits;
|
||||
|
@ -70,9 +70,7 @@
|
||||
# include <boost/static_assert.hpp>
|
||||
# include <boost/type_traits.hpp>
|
||||
# include <boost/detail/select_type.hpp>
|
||||
# ifndef BOOST_NO_LIMITS
|
||||
# include <limits>
|
||||
# endif
|
||||
# include <boost/limits.hpp>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
@ -83,7 +81,7 @@ namespace boost { namespace detail {
|
||||
template <class Number>
|
||||
struct is_signed
|
||||
{
|
||||
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_MSVC)
|
||||
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0)));
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<Number>::is_signed);
|
||||
@ -137,7 +135,7 @@ namespace boost { namespace detail {
|
||||
private:
|
||||
typedef Integer integer_type;
|
||||
typedef std::numeric_limits<integer_type> x;
|
||||
# ifdef BOOST_MSVC
|
||||
# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
// for some reason, MSVC asserts when it shouldn't unless we make these
|
||||
// local definitions
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = x::is_integer);
|
||||
|
35
include/boost/visit_each.hpp
Normal file
35
include/boost/visit_each.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
// Boost.Signals library
|
||||
//
|
||||
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
|
||||
//
|
||||
// Permission to copy, use, sell and distribute this software is granted
|
||||
// provided this copyright notice appears in all copies.
|
||||
// Permission to modify the code and to distribute modified code is granted
|
||||
// provided this copyright notice appears in all copies, and a notice
|
||||
// that the code was modified is included with the copyright notice.
|
||||
//
|
||||
// This software is provided "as is" without express or implied warranty,
|
||||
// and with no claim as to its suitability for any purpose.
|
||||
|
||||
// For more information, see http://www.boost.org
|
||||
|
||||
#ifndef BOOST_VISIT_EACH_HPP
|
||||
#define BOOST_VISIT_EACH_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost {
|
||||
template<typename Visitor, typename T>
|
||||
inline void visit_each(Visitor& visitor, const T& t, long)
|
||||
{
|
||||
visitor(t);
|
||||
}
|
||||
|
||||
template<typename Visitor, typename T>
|
||||
inline void visit_each(Visitor& visitor, const T& t)
|
||||
{
|
||||
visit_each(visitor, t, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_VISIT_EACH_HPP
|
Reference in New Issue
Block a user