/* * StatusLazyFast.hpp * * Created on: 29 нояб. 2018 г. * Author: titov */ #ifndef SOURCE_SYSTEMIC_STATUSLAZYFAST_HPP_ #define SOURCE_SYSTEMIC_STATUSLAZYFAST_HPP_ #include "IStatus.hh" #include "IStatusOverride.hh" namespace systemic { namespace detail { template class StatusLazyFast : public IStatus { private: const T & object; public: StatusLazyFast( const T & obj ); operator bool() const final; StatusLazyFast(const StatusLazyFast &) = delete; StatusLazyFast & operator=(const StatusLazyFast &) = delete; }; } } template inline systemic::detail::StatusLazyFast::StatusLazyFast( const T & obj ) : object(obj) {} template inline systemic::detail::StatusLazyFast::operator bool() const { return (object.*pf)(); } #endif /* SOURCE_SYSTEMIC_STATUSLAZYFAST_HPP_ */