1#ifndef FLIPPY_CUSTOM_CONCEPTS_HPP
2#define FLIPPY_CUSTOM_CONCEPTS_HPP
31 template<
class T>
concept indexing_number = std::is_unsigned_v<T> && std::is_integral_v<T>;
34 using Index =
unsigned int;
38 namespace implementation {
39 template<
typename C>
concept Beginable=
requires(C c) { std::begin(c); };
40 template<
typename C>
concept Endable=
requires(C c) { std::end(c); };
41 template<
typename C>
concept NeqableBeginAndEnd =
requires(C c) {{ std::begin(c) != std::end(c) } -> std::same_as<bool>; };
43 template<
typename C>
concept BeginDerefable =
requires(C c) { *std::begin(c); };
44 template<
typename C>
concept BeginDerefToVoid =
requires(C c) {{ *std::begin(c) } -> std::same_as<void>; };
46 requires std::destructible<
decltype(std::begin(c))> &&
47 std::destructible<
decltype(std::end(c))> &&
48 std::copy_constructible<
decltype(std::begin(c))> &&
49 std::copy_constructible<
decltype(std::end(c))>;
65 static Real
operator"" _r(
long double value) {
66 return static_cast<Real
>(value);
68 static Real
operator"" _r(
unsigned long long value) {
69 return static_cast<Real
>(value);
72 static constexpr auto PI =
static_cast<Real
>(3.14159265358979323846264338327950288);
Definition custom_concepts.hpp:55
Here we implement the concepts of a floating point number.
Definition custom_concepts.hpp:24
Definition custom_concepts.hpp:45
Definition custom_concepts.hpp:44
Definition custom_concepts.hpp:43
Definition custom_concepts.hpp:42
Definition custom_concepts.hpp:39
Definition custom_concepts.hpp:40
Definition custom_concepts.hpp:41
Here we implement the concepts of a positive integer number that is used throughout the code for inde...
Definition custom_concepts.hpp:31
Definition custom_concepts.hpp:8