4 #ifndef __FRIOS_UTILS_UNIQUE_HPP__
5 #define __FRIOS_UTILS_UNIQUE_HPP__
13 template <
typename T,
bool POD>
17 class unique_impl<T, true>
23 unique_impl(
const unique_impl&) =
delete;
29 template <
typename ... P>
30 unique_impl(P&& ... p)
31 : _value(std::forward<P>(p)...)
35 unique_impl(unique_impl&& tmp)
42 bool valid(
void)
const
53 const T&
get(void)
const
64 operator const T& (void)
const
74 const T* operator & (
void)
const
87 :
public unique_impl<T, std::is_pod<T>::value>
90 typedef unique_impl<T, std::is_pod<T>::value> base;
98 template <
typename ... P>
100 : base(std::forward<P>(p)...)
105 : base(static_cast<base&&>(tmp))
111 #endif // include guard
unique(unique &&tmp)
unique objects are movable
Definition: unique.hpp:104
unique(P &&...p)
Construction with arbitrary number of parameters.
Definition: unique.hpp:99
unique(void)
Default construction.
Definition: unique.hpp:93
Wrapper ensuring the uniqueness of a value.
Definition: unique.hpp:86