// Copyright (c) 2014 // INRIA Saclay-Ile de France (France) // // This file is part of CGAL (www.cgal.org) // // $URL: https://github.com/CGAL/cgal/blob/v5.1/NewKernel_d/include/CGAL/NewKernel_d/static_int.h $ // $Id: static_int.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse #ifndef CGAL_STATIC_INT_H #define CGAL_STATIC_INT_H #include namespace CGAL { template struct static_zero { operator NT() const { return constant(); } }; template struct static_one { operator NT() const { return constant(); } }; template static_zero operator-(static_zero) { return static_zero(); } template NT operator+(NT const& x, static_zero) { return x; } template NT operator+(static_zero, NT const& x) { return x; } template static_zero operator+(static_zero, static_zero) { return static_zero(); } template static_one operator+(static_zero, static_one) { return static_one(); } template static_one operator+(static_one, static_zero) { return static_one(); } template NT operator-(NT const& x, static_zero) { return x; } template NT operator-(static_zero, NT const& x) { return -x; } template static_zero operator-(static_zero, static_zero) { return static_zero(); } template static_zero operator-(static_one, static_one) { return static_zero(); } template static_one operator-(static_one, static_zero) { return static_one(); } template NT operator*(NT const& x, static_one) { return x; } template NT operator*(static_one, NT const& x) { return x; } template static_zero operator*(NT const&, static_zero) { return static_zero(); } template static_zero operator*(static_zero, NT const&) { return static_zero(); } template static_zero operator*(static_zero, static_zero) { return static_zero(); } template static_one operator*(static_one, static_one) { return static_one(); } template static_zero operator*(static_zero, static_one) { return static_zero(); } template static_zero operator*(static_one, static_zero) { return static_zero(); } template NT operator/(NT const& x, static_one) { return x; } template static_zero operator/(static_zero, NT const&) { return static_zero(); } template static_zero operator/(static_zero, static_one) { return static_zero(); } template static_one operator/(static_one, static_one) { return static_one(); } } #endif // CGAL_STATIC_INT_H