NTLib - Number Theory Library 0.9
Loading...
Searching...
No Matches
ntlib::HasMultiplicativeNeutral Concept Referenceexport
module base

Restricts to types with a multiplicative neutral element. More...

Concept definition

template<typename T>
concept HasMultiplicativeNeutral = requires(T n) {
// Existence.
{ ntlib::one<T>() } -> std::convertible_to<T>;
}
Restricts to types with a multiplicative neutral element.
Definition concepts.cpp:128
constexpr T one() noexcept
Returns the multiplicative neutral element of a given type.
Definition concepts.cpp:93

Detailed Description

Restricts to types with a multiplicative neutral element.

Note
The least restrictive (multiplicative) concept in NTLib requiring a multiplicative neutral element is MultiplicativeMonoid. Therefore, the following can be assumed to hold:
  • The multiplicative neutral element is unique.
  • The unique multiplicative neutral element is left- and right-neutral.
Template Parameters
TA set with an inner multiplication operation.