Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : 5 : namespace utils::shared_ptr { 6 : 7 : template<typename T> 8 : struct less { 9 : bool operator()(const std::shared_ptr<T> &a, const std::shared_ptr<T> &b) const { 10 : return *a < *b; 11 : } 12 : }; 13 : 14 : template<typename T> 15 : struct greater { 16 0 : bool operator()(const std::shared_ptr<T> &a, const std::shared_ptr<T> &b) const { 17 0 : return *a > *b; 18 : } 19 : }; 20 : 21 : } // namespace utils::shared_ptr