aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/newtype/impl/new_type_storage.hpp1
-rw-r--r--include/newtype/new_type.hpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/include/newtype/impl/new_type_storage.hpp b/include/newtype/impl/new_type_storage.hpp
index 5f64771..5cec601 100644
--- a/include/newtype/impl/new_type_storage.hpp
+++ b/include/newtype/impl/new_type_storage.hpp
@@ -2,6 +2,7 @@
#define NEWTYPE_IMPL_NEW_TYPE_STORAGE_HPP
#include <type_traits>
+#include <utility>
namespace nt::impl
{
diff --git a/include/newtype/new_type.hpp b/include/newtype/new_type.hpp
index 0b7d6d0..77b531e 100644
--- a/include/newtype/new_type.hpp
+++ b/include/newtype/new_type.hpp
@@ -39,6 +39,8 @@ namespace nt
using super = impl::new_type_move_assignment<BaseType, TagType>;
public:
+ /// @section Type aliases
+
/**
* @brief The base type of this nt::new_type
*
@@ -60,6 +62,8 @@ namespace nt
*/
using derivation_clause_type = decltype(DerivationClause);
+ /// @section Derivation clause access
+
/**
* @brief The derivation clause fo this nt::new_type
*
@@ -67,6 +71,8 @@ namespace nt
*/
auto constexpr static derivation_clause = DerivationClause;
+ /// @section Constructors
+
using super::super;
/**
@@ -95,6 +101,8 @@ namespace nt
*/
constexpr new_type(new_type &&) noexcept(std::is_nothrow_move_constructible_v<BaseType>) = default;
+ /// @section Assignment operators
+
/**
* @brief Copy-assign the value of an existing instance of this nt::new_type to this instance
*
@@ -115,6 +123,8 @@ namespace nt
*/
auto constexpr operator=(new_type &&) noexcept(std::is_nothrow_move_assignable_v<BaseType>) -> new_type & = default;
+ /// @section Accessors
+
/**
* @brief Obtain a copy of the contained base type object
*
@@ -147,6 +157,8 @@ namespace nt
return decay();
}
+ /// @section Indirection operators
+
/**
* @brief Perform an access to a member of the base type
*
@@ -170,6 +182,8 @@ namespace nt
}
};
+ /// @section Equality comparison operators
+
/**
* @brief Compare two objects for equality
*
@@ -202,6 +216,8 @@ namespace nt
return lhs.decay() != rhs.decay();
}
+ /// @section Relational operators
+
/**
* @brief Check if one nt::new_type object is less-than an other
*
@@ -274,6 +290,8 @@ namespace nt
return lhs.decay() >= rhs.decay();
}
+ /// @section Stream input/output operators
+
/**
* @brief Write the contained base type object to a standard output stream
*