16 #ifndef IOX_UTILS_CXX_NEWTYPE_HPP
17 #define IOX_UTILS_CXX_NEWTYPE_HPP
19 #include "iceoryx_utils/cxx/algorithm.hpp"
20 #include "iceoryx_utils/internal/cxx/newtype/assignment.hpp"
21 #include "iceoryx_utils/internal/cxx/newtype/comparable.hpp"
22 #include "iceoryx_utils/internal/cxx/newtype/constructor.hpp"
23 #include "iceoryx_utils/internal/cxx/newtype/convertable.hpp"
24 #include "iceoryx_utils/internal/cxx/newtype/internal.hpp"
25 #include "iceoryx_utils/internal/cxx/newtype/protected_constructor.hpp"
26 #include "iceoryx_utils/internal/cxx/newtype/sortable.hpp"
28 #include <type_traits>
63 template <
typename T,
template <
typename>
class... Policies>
64 class NewType :
public Policies<NewType<T, Policies...>>...
79 explicit
NewType(const T& rhs) noexcept;
94 NewType& operator=(const T& rhs) noexcept;
97 NewType& operator=(T&& rhs) noexcept;
100 explicit operator T() const noexcept;
102 template <typename Type>
103 friend typename Type::
value_type newtype::internal::newTypeAccessor(const Type&) noexcept;
111 #include "iceoryx_utils/internal/cxx/newtype.inl"
Implementation of the haskell NewType pattern: https://wiki.haskell.org/Newtype Lets say you would li...
Definition: newtype.hpp:65
T value_type
the type of the underlying value
Definition: newtype.hpp:73
NewType() noexcept
default constructor
Definition: newtype.inl:24
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28
Definition: internal.hpp:32