<commit_before># General utilities library                                          [utilities]

## General                                                   [utilities.general]

This clause describes generally useful utilities.
These utilities are summarized in [tab:utilities.summary].

   General utilities library summary [tab:utilities.summary]

   |           | Subclause          | Header               |
   | --------- | :----------------- | :------------------- |
   | [utility] | Utility components | `<jegp/utility.hpp>` |

## Utility components                                                  [utility]

### Header `<jegp/utility.hpp>` synopsis                           [utility.syn]

This header contains some basic constructs.

```C++
namespace jegp {

template <class T>
inline constexpr std::size_t bitsof{sizeof(T) * CHAR_BIT};

// [utility.underlying], `underlying`
template <class Enum>
constexpr std::underlying_type_t<Enum> underlying(Enum e) noexcept;

// [static.downcast], `static_downcast`
template <class DerivedRef, class Base>
constexpr DerivedRef static_downcast(Base&& b) noexcept;

// [hash.combine], `hash_combine`
template <class... Args>
constexpr std::size_t hash_combine(const Args&... args) noexcept(/*see below*/);

} // namespace jegp
```

### `underlying`                                            [utility.underlying]

```C++
template <class Enum>
constexpr std::underlying_type_t<Enum> underlying(Enum e) noexcept;
```
_Constraints:_ `std::is_enum_v<Enum>` is `true`.

_Returns:_ `static_cast<std::underlying_type_t<Enum>>(e)`.

### `static_downcast`                                          [static.downcast]

A statically constrained `static_cast`<commit_msg>Apply Clang-Format<commit_after># General utilities library                                          [utilities]

## General                                                   [utilities.general]

This clause describes generally useful utilities.
These utilities are summarized in [tab:utilities.summary].

   General utilities library summary [tab:utilities.summary]

   |           | Subclause          | Header               |
   | --------- | :----------------- | :------------------- |
   | [utility] | Utility components | `<jegp/utility.hpp>` |

## Utility components                                                  [utility]

### Header `<jegp/utility.hpp>` synopsis                           [utility.syn]

This header contains some basic constructs.

```C++
namespace jegp
{
template <class T>
inline constexpr std::size_t bitsof{sizeof(T) * CHAR_BIT};

// [utility.underlying], `underlying`
template <class Enum>
constexpr std::underlying_type_t<Enum> underlying(Enum e) noexcept;

// [static.downcast], `static_downcast`
template <class DerivedRef, class Base>
constexpr DerivedRef static_downcast(Base&& b) noexcept;

// [hash.combine], `hash_combine`
template <class... Args>
constexpr std::size_t hash_combine(const Args&... args) noexcept(/*see below*/);

} // namespace jegp
```

### `underlying`                                            [utility.underlying]

```C++
template <class Enum>
constexpr std::underlying_type_t<Enum> underlying(Enum e) noexcept;
```
_Constraints:_ `std::is_enum_v<Enum>` is `true`.

_Returns:_ `static_cast<std::underlying_type_t<Enum>>(e)`.

### `static_downcast`                                          [static.downcast]

A statically constrained `static_cast`
{'fraction_non_alphanumeric': 0.14373536299765807, 'fraction_numerical': 0.0, 'mean_word_length': 2.199438202247191, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '299620', 'n_tokens_mistral': 959, 'n_tokens_neox': 912, 'n_words': 226}