mirror of
https://github.com/boostorg/detail.git
synced 2025-06-28 21:41:07 +02:00
Compare commits
1 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
5e54c37940 |
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2003-2008 Joaquin M Lopez Munoz.
|
/* Copyright 2003-2007 Joaqu<EFBFBD>n M L<EFBFBD>pez Mu<EFBFBD>oz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
@ -42,10 +42,10 @@
|
|||||||
# error Unknown machine endianness detected.
|
# error Unknown machine endianness detected.
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_BYTE_ORDER __BYTE_ORDER
|
# define BOOST_BYTE_ORDER __BYTE_ORDER
|
||||||
#elif defined(_BIG_ENDIAN)
|
#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||||
# define BOOST_BIG_ENDIAN
|
# define BOOST_BIG_ENDIAN
|
||||||
# define BOOST_BYTE_ORDER 4321
|
# define BOOST_BYTE_ORDER 4321
|
||||||
#elif defined(_LITTLE_ENDIAN)
|
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
|
||||||
# define BOOST_LITTLE_ENDIAN
|
# define BOOST_LITTLE_ENDIAN
|
||||||
# define BOOST_BYTE_ORDER 1234
|
# define BOOST_BYTE_ORDER 1234
|
||||||
#elif defined(__sparc) || defined(__sparc__) \
|
#elif defined(__sparc) || defined(__sparc__) \
|
||||||
|
@ -62,6 +62,11 @@ namespace is_incrementable_
|
|||||||
// In case an operator++ is found that returns void, we'll use ++x,0
|
// In case an operator++ is found that returns void, we'll use ++x,0
|
||||||
tag operator,(tag,int);
|
tag operator,(tag,int);
|
||||||
# define BOOST_comma(a,b) (a,b)
|
# define BOOST_comma(a,b) (a,b)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined(BOOST_MSVC)
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable:4913) // Warning about operator,
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
// two check overloads help us identify which operator++ was picked
|
// two check overloads help us identify which operator++ was picked
|
||||||
@ -92,6 +97,11 @@ namespace is_incrementable_
|
|||||||
, value = sizeof(is_incrementable_::check(BOOST_comma(x++,0))) == 1
|
, value = sizeof(is_incrementable_::check(BOOST_comma(x++,0))) == 1
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# if defined(BOOST_MSVC)
|
||||||
|
# pragma warning(pop)
|
||||||
|
# endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# undef BOOST_comma
|
# undef BOOST_comma
|
||||||
|
@ -79,25 +79,16 @@
|
|||||||
// specialized on those types for this to work.
|
// specialized on those types for this to work.
|
||||||
|
|
||||||
#include <locale>
|
#include <locale>
|
||||||
// for mbstate_t
|
#include <cwchar> // for mbstate_t
|
||||||
#include <wchar.h>
|
#include <cstddef> // for std::size_t
|
||||||
// for std::size_t
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
namespace std {
|
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||||
#if defined(__LIBCOMO__)
|
|
||||||
using ::mbstate_t;
|
|
||||||
#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__)
|
|
||||||
using ::mbstate_t;
|
|
||||||
#elif defined(__SGI_STL_PORT)
|
|
||||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
|
||||||
using ::mbstate_t;
|
|
||||||
using ::codecvt;
|
using ::codecvt;
|
||||||
#endif
|
using ::mbstate_t;
|
||||||
} // namespace std
|
#endif
|
||||||
|
|
||||||
#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__)
|
#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__)
|
||||||
#define BOOST_CODECVT_DO_LENGTH_CONST const
|
#define BOOST_CODECVT_DO_LENGTH_CONST const
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
// -----------------------------------------------------------
|
// -------------------------------------
|
||||||
// integer_log2.hpp
|
// integer_log2.hpp
|
||||||
//
|
//
|
||||||
// Gives the integer part of the logarithm, in base 2, of a
|
// Gives the integer part of the logarithm, in base 2, of a
|
||||||
// given number. Behavior is undefined if the argument is <= 0.
|
// given number. Behavior is undefined if the argument is <= 0.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2003-2004, 2008 Gennaro Prota
|
//
|
||||||
|
// (C) Copyright Gennaro Prota 2003 - 2004.
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
// -----------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
|
//
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
|
||||||
#ifndef BOOST_INTEGER_LOG2_HPP_GP_20030301
|
#ifndef BOOST_INTEGER_LOG2_HPP_GP_20030301
|
||||||
#define BOOST_INTEGER_LOG2_HPP_GP_20030301
|
#define BOOST_INTEGER_LOG2_HPP_GP_20030301
|
||||||
@ -33,7 +37,7 @@ namespace boost {
|
|||||||
|
|
||||||
while (x != 1) {
|
while (x != 1) {
|
||||||
|
|
||||||
const T t = static_cast<T>(x >> n);
|
const T t = x >> n;
|
||||||
if (t) {
|
if (t) {
|
||||||
result += n;
|
result += n;
|
||||||
x = t;
|
x = t;
|
||||||
|
Reference in New Issue
Block a user