Chris@16: /* Boost interval/compare/set.hpp template implementation file Chris@16: * Chris@16: * Copyright 2002-2003 Guillaume Melquiond Chris@16: * Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or Chris@16: * copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: #ifndef BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP Chris@16: #define BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace numeric { Chris@16: namespace interval_lib { Chris@16: namespace compare { Chris@16: namespace set { Chris@16: Chris@16: template inline Chris@16: bool operator<(const interval& x, const interval& y) Chris@16: { Chris@16: return proper_subset(x, y); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator<(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: template inline Chris@16: bool operator<=(const interval& x, const interval& y) Chris@16: { Chris@16: return subset(x, y); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator<=(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: template inline Chris@16: bool operator>(const interval& x, const interval& y) Chris@16: { Chris@16: return proper_subset(y, x); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator>(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: template inline Chris@16: bool operator>=(const interval& x, const interval& y) Chris@16: { Chris@16: return subset(y, x); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator>=(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: template inline Chris@16: bool operator==(const interval& x, const interval& y) Chris@16: { Chris@16: return equal(y, x); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator==(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: template inline Chris@16: bool operator!=(const interval& x, const interval& y) Chris@16: { Chris@16: return !equal(y, x); Chris@16: } Chris@16: Chris@16: template inline Chris@101: bool operator!=(const interval& , const T& ) Chris@16: { Chris@16: throw comparison_error(); Chris@16: } Chris@16: Chris@16: } // namespace set Chris@16: } // namespace compare Chris@16: } // namespace interval_lib Chris@16: } // namespace numeric Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP