blob: c49364bb10f2023cfde4a11f9a15c01fff581c15 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001//
2//! Copyright (c) 2011
3//! Brandon Kohn
4//
5// Distributed under the Boost Software License, Version 1.0. (See
6// accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
Jeff Thompson3d613fd2013-10-15 15:39:04 -07009#ifndef NDNBOOST_NUMERIC_CAST_TRAITS_HPP
10#define NDNBOOST_NUMERIC_CAST_TRAITS_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070011
12#include <ndnboost/numeric/conversion/converter_policies.hpp>
13
14namespace ndnboost { namespace numeric {
15
16 template <typename Target, typename Source, typename EnableIf = void>
17 struct numeric_cast_traits
18 {
19 typedef def_overflow_handler overflow_policy;
20 typedef UseInternalRangeChecker range_checking_policy;
21 typedef Trunc<Source> rounding_policy;
22 };
23
24}}//namespace ndnboost::numeric;
25
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026#if !defined( NDNBOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS )
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070027#include <ndnboost/cstdint.hpp>
28#include <ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029#endif//!defined NDNBOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070030
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031#endif//NDNBOOST_NUMERIC_CAST_TRAITS_HPP