1// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005.
2// Use, modification and distribution are subject to the Boost Software License,
3// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
4// http://www.boost.org/LICENSE_1_0.txt).
5//
6// See http://www.boost.org/libs/type_traits for most recent version including documentation.
7
8#ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
9#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
10
11#include <boost/type_traits/integral_constant.hpp>
12
13namespace boost {
14
15//* is a type T a floating-point type described in the standard (3.9.1p8)
16 template <class T> struct is_floating_point : public false_type{};
17 template <class T> struct is_floating_point<const T> : public is_floating_point<T>{};
18 template <class T> struct is_floating_point<volatile const T> : public is_floating_point<T>{};
19 template <class T> struct is_floating_point<volatile T> : public is_floating_point<T>{};
20 template<> struct is_floating_point<float> : public true_type{};
21 template<> struct is_floating_point<double> : public true_type{};
22 template<> struct is_floating_point<long double> : public true_type{};
23
24#if defined(BOOST_HAS_FLOAT128)
25 template<> struct is_floating_point<__float128> : public true_type{};
26#endif
27
28} // namespace boost
29
30#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
31

source code of include/boost/type_traits/is_floating_point.hpp