- Added More Documentation

This commit is contained in:
2025-06-17 19:45:33 -04:00
parent 079b0b27ee
commit 9d35daa494
28 changed files with 1852 additions and 190 deletions

View File

@@ -31,6 +31,37 @@
#ifndef FENNEC_LANG_CONSTANTS_H
#define FENNEC_LANG_CONSTANTS_H
///
///
/// \page fennec_lang_constants Constants
///
/// \brief This header is part of the metaprogramming library. It defines structures for constant values,
/// used during compile time.
///
/// \code #include <fennec/lang/constants.h> \endcode
///
/// <table width="100%" class="fieldtable" id="table_fennec_lang_constants">
/// <tr><th style="vertical-align: top">Syntax
/// <th style="vertical-align: top">Description
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
/// \ref fennec::integral_constant "integral_constant<IntT, IntT ValueV>::type"<br>
/// <td width="50%" style="vertical-align: top">
/// \copydetails fennec::integral_constant
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
/// \ref fennec::bool_constant "bool_constant<bool_t ValueV>::type"<br>
/// <td width="50%" style="vertical-align: top">
/// \copydetails fennec::bool_constant
///
/// <tr><td width="50%" style="vertical-align: top"> <br>
/// \ref fennec::bool_constant "bool_constant<bool_t ValueV>::type"<br>
/// <td width="50%" style="vertical-align: top">
/// \copydetails fennec::bool_constant
///
/// </table>
///
#include <fennec/lang/types.h>
namespace fennec
@@ -39,19 +70,19 @@ namespace fennec
///
/// \brief metaprogramming integral constant
///
/// \details
/// \tparam T type of the constant
/// \tparam V value of the constant
template<typename T, T V> struct integral_constant
/// \details A metaprogramming integral constant
/// \tparam IntT type of the constant
/// \tparam ValueV value of the constant
template<typename IntT, IntT ValueV> struct integral_constant
{
///
/// \brief value of the constant
inline static constexpr T value = V;
inline static constexpr IntT value = ValueV;
///
/// \brief cast operator to allow for braced initialization
/// \returns the value of the constant
constexpr operator T() const noexcept { return V; }
constexpr operator IntT() const noexcept { return value; }
};
@@ -59,10 +90,10 @@ template<typename T, T V> struct integral_constant
/// \brief metaprogramming boolean constant
///
/// \details
/// \tparam V value of the constant
template<bool_t V>
/// \tparam ValueV value of the constant
template<bool_t ValueV>
struct bool_constant
: integral_constant<bool_t, V> {};
: integral_constant<bool_t, ValueV> {};
///