Boost logo

Boost :

Subject: Re: [boost] [smart_ptr] error with nullptr_t
From: Peter Dimov (lists_at_[hidden])
Date: 2012-12-19 06:00:06

Eric Niebler wrote:

> I just got bit by this. For the record, I don't think it's
> Boost.Config's business to be defining std::move, std::forward, etc.

It's not like this is a first.

orkaround --------------------------------------//
// Because std::size_t usage is so common, even in boost headers which do
// otherwise use the C library, the <cstddef> workaround is included here
// that ugly workaround code need not appear in many other boost headers.
// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
// must still be #included in the usual places so that <cstddef> inclusion
// works as expected with standard conforming compilers. The resulting
// double inclusion of <cstddef> is harmless.

# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
# include <cstddef>
    namespace std { using ::ptrdiff_t; using ::size_t; }
# endif


orkaround -----------------------------------------//

# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)

namespace std {
  template <class _Tp>
  inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a,
const _Tp& __b) {
    return __b < __a ? __b : __a;
  template <class _Tp>
  inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a,
const _Tp& __b) {
    return __a < __b ? __b : __a;

# endif


// When BOOST_NO_STD_TYPEINFO is defined, we can just import
// the global definition into std namespace:
#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
#include <typeinfo>
namespace std{ using ::type_info; }

Boost list run by bdawes at, gregod at, cpdaniel at, john at