source: NonGTP/Boost/boost/numeric/interval/detail/bugs.hpp @ 857

Revision 857, 2.3 KB checked in by igarcia, 19 years ago (diff)
Line 
1/* Boost interval/detail/bugs.hpp file
2 *
3 * Copyright 2000 Jens Maurer
4 * Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
5 *
6 * Distributed under the Boost Software License, Version 1.0.
7 * (See accompanying file LICENSE_1_0.txt or
8 * copy at http://www.boost.org/LICENSE_1_0.txt)
9 */
10
11#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
12#define BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
13
14#include <boost/config.hpp>
15
16#if defined(__GLIBC__) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) || defined(__USE_ISOC99)) && !defined(__ICC)
17#  define BOOST_HAS_INV_HYPERBOLIC
18#endif
19
20#ifdef BOOST_NO_STDC_NAMESPACE
21#  define BOOST_NUMERIC_INTERVAL_using_math(a) using ::a
22#  ifdef BOOST_HAS_INV_HYPERBOLIC
23#    define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
24#  endif
25#else
26#  define BOOST_NUMERIC_INTERVAL_using_math(a) using std::a
27#  if defined(BOOST_HAS_INV_HYPERBOLIC)
28#    if defined(__GLIBCPP__) || defined(__GLIBCXX__)
29#    define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
30#    else
31#    define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using std::a
32#  endif
33#  endif
34#endif
35
36#if defined(__COMO__) || defined(BOOST_INTEL)
37#  define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
38#elif defined(BOOST_NO_STDC_NAMESPACE)
39#  define BOOST_NUMERIC_INTERVAL_using_max(a) using ::a
40#else
41#  define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
42#endif
43
44#ifndef BOOST_NUMERIC_INTERVAL_using_ahyp
45#  define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
46#endif
47
48#if defined(__GNUC__) && (__GNUC__ <= 2)
49// cf PR c++/1981 for a description of the bug
50#include <algorithm>
51#include <cmath>
52namespace boost {
53namespace numeric {
54  using std::min;
55  using std::max;
56  using std::sqrt;
57  using std::exp;
58  using std::log;
59  using std::cos;
60  using std::tan;
61  using std::asin;
62  using std::acos;
63  using std::atan;
64  using std::ceil;
65  using std::floor;
66  using std::sinh;
67  using std::cosh;
68  using std::tanh;
69# undef BOOST_NUMERIC_INTERVAL_using_max
70# undef BOOST_NUMERIC_INTERVAL_using_math
71# define BOOST_NUMERIC_INTERVAL_using_max(a)
72# define BOOST_NUMERIC_INTERVAL_using_math(a)
73# undef BOOST_NUMERIC_INTERVAL_using_ahyp
74# define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
75} // namespace numeric
76} // namespace boost
77#endif
78
79#endif // BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
Note: See TracBrowser for help on using the repository browser.