![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/move/algo/ |
Upload File : |
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2015-2016. // 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) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_MOVE_ALGO_PREDICATE_HPP #define BOOST_MOVE_ALGO_PREDICATE_HPP #include <boost/move/algo/move.hpp> #include <boost/move/adl_move_swap.hpp> #include <boost/move/algo/detail/basic_op.hpp> #include <boost/move/detail/iterator_traits.hpp> #include <boost/move/detail/destruct_n.hpp> #include <boost/assert.hpp> namespace boost { namespace movelib { template<class Comp> struct antistable { explicit antistable(Comp &comp) : m_comp(comp) {} antistable(const antistable & other) : m_comp(other.m_comp) {} template<class U, class V> bool operator()(const U &u, const V & v) { return !m_comp(v, u); } const Comp &get() const { return m_comp; } private: antistable & operator=(const antistable &); Comp &m_comp; }; template<class Comp> Comp unantistable(Comp comp) { return comp; } template<class Comp> Comp unantistable(antistable<Comp> comp) { return comp.get(); } template <class Comp> class negate { public: negate() {} explicit negate(Comp comp) : m_comp(comp) {} template <class T1, class T2> bool operator()(const T1& l, const T2& r) { return !m_comp(l, r); } private: Comp m_comp; }; template <class Comp> class inverse { public: inverse() {} explicit inverse(Comp comp) : m_comp(comp) {} template <class T1, class T2> bool operator()(const T1& l, const T2& r) { return m_comp(r, l); } private: Comp m_comp; }; } //namespace movelib { } //namespace boost { #endif //#define BOOST_MOVE_ALGO_PREDICATE_HPP