15 #ifndef SHARED_OBJECT_HPP_INCLUDED
16 #define SHARED_OBJECT_HPP_INCLUDED
33 template <
typename T,
typename node = shared_node<T> >
50 operator const T &()
const {
71 void set(
const T& o) {
72 if (
valid() && o ==
get())
return;
78 assert((
val_->count) < (node::max_count));
81 const T&
get()
const {
90 const node*
ptr()
const {
99 return val_ !=
nullptr;
103 if (!
valid())
return;
112 template <
typename T>
117 template <
typename T>
121 return a.get() <
b.get();
124 template <
typename T>
125 std::ostream& operator<<(std::ostream& stream, const shared_object<T>& o) {
130 template <
typename T>
133 std::istream& ret = stream >>
t;
shared_object(const shared_object &o)
shared_object(const T &o)
static void erase_from_index(const node *)
shared_object & operator=(const T &o)
Assignment from the template type is supported.
bool operator==(const shared_object< T > &a, const shared_object< T > &b)
std::istream & operator>>(std::istream &stream, shared_object< T > &o)
void swap(shared_object &o)
shared_object & operator=(const shared_object &o)
GLdouble GLdouble GLdouble b
static const unsigned long max_count
GLboolean GLboolean GLboolean GLboolean a
void swap(game_board &one, game_board &other)
static const node * insert_into_index(const node &)