/* Boost interval/ext/integer.hpp template implementation file * * Copyright 2003 Guillaume Melquiond * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP #define BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP #include #include namespace boost { namespace numeric { template inline interval operator+ (const interval& x, int y) { return x + static_cast(y); } template inline interval operator+ (int x, const interval& y) { return static_cast(x) + y; } template inline interval operator- (const interval& x, int y) { return x - static_cast(y); } template inline interval operator- (int x, const interval& y) { return static_cast(x) - y; } template inline interval operator* (const interval& x, int y) { return x * static_cast(y); } template inline interval operator* (int x, const interval& y) { return static_cast(x) * y; } template inline interval operator/ (const interval& x, int y) { return x / static_cast(y); } template inline interval operator/ (int x, const interval& y) { return static_cast(x) / y; } } // namespace numeric } // namespace boost #endif // BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP