diff --git a/furvm/include/furvm/detail/handle.hpp b/furvm/include/furvm/detail/handle.hpp index e426c33..25f5641 100644 --- a/furvm/include/furvm/detail/handle.hpp +++ b/furvm/include/furvm/detail/handle.hpp @@ -6,15 +6,24 @@ namespace furvm { namespace detail { +/** + * @brief Default specialization for header_has_refcount type trait. + */ template struct header_has_refcount : std::false_type {}; +/** + * @brief Specialization for header_has_refcount type trait. + */ template struct header_has_refcount().acquire()), decltype(std::declval().release()), decltype(std::declval().reference_count())>> : std::true_type {}; +/** + * @brief An alias for header_has_refcount's value. + */ template static constexpr auto header_has_refcount_v = header_has_refcount
::value; diff --git a/furvm/include/furvm/detail/serialization.hpp b/furvm/include/furvm/detail/serialization.hpp index 34fc51e..a406b1f 100644 --- a/furvm/include/furvm/detail/serialization.hpp +++ b/furvm/include/furvm/detail/serialization.hpp @@ -8,15 +8,69 @@ namespace furvm { namespace detail { +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::int8_t value); std::ostream& serialize(std::ostream& os, std::int16_t value); + +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::int32_t value); std::ostream& serialize(std::ostream& os, std::int64_t value); + +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::uint8_t value); + +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::uint16_t value); + +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::uint32_t value); + +/** + * @brief Serializes an integer. + * + * @param os Output stream. + * @param value Integer. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, std::uint64_t value); +/** + * @brief Serializes a string. + * + * @param os Output stream. + * @param value String. + * @return The output stream. + */ std::ostream& serialize(std::ostream& os, const std::string& value); } // namespace detail