Bytemaster's Boost Libraries
|
00001 #ifndef __BOOST_RPC_REQUIRED_HPP__ 00002 #define __BOOST_RPC_REQUIRED_HPP__ 00003 #include <boost/optional.hpp> 00004 00005 namespace boost { namespace rpc { 00006 template<typename T> 00007 struct required : public boost::optional<T> 00008 { 00009 typedef boost::optional<T> base; 00010 required(){} 00011 required( const T& v ) 00012 :boost::optional<T>(v){} 00013 00014 operator T& () { return **this; } 00015 operator const T& ()const { return **this; } 00016 using base::operator=; 00017 using base::operator*; 00018 using base::operator!; 00019 }; 00020 00021 } } // namespace boost::rpc 00022 #endif // __BOOST_RPC_REQUIRED_HPP__