This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <algorithm> | |
#include <array> | |
#include <iostream> | |
using std::size_t; | |
auto constexpr calculate(size_t row, size_t column, size_t width, size_t height, size_t value = 0) | |
{ | |
--width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <functional> | |
// | |
struct validator | |
{ | |
template <template <class...> class, class...> | |
static auto constexpr is_valid(...) | |
-> std::false_type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <type_traits> | |
#include <utility> | |
// | |
template <auto... Vs> | |
struct auto_t | |
{ static auto constexpr size = sizeof...(Vs); }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> | |
#include <array> | |
template <auto...> | |
struct value_list | |
{}; | |
template <class T, auto... Keys> | |
struct map_ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <utility> | |
#include <limits> | |
#include <array> | |
// | |
template <auto V_> | |
struct auto_t | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <limits> | |
#include <utility> | |
// | |
template <class... Ts> | |
struct type_t | |
{ static auto constexpr size = sizeof...(Ts); }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <utility> | |
#include <cstddef> | |
#include <string_view> | |
#include <iterator> | |
#include <limits> | |
#include <tuple> | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <std::size_t N, class T> | |
struct tuple_elem | |
{ | |
constexpr tuple_elem(T&& val) | |
: val_{ std::forward<T>(val) } | |
{} | |
template <auto I, std::enable_if_t<I == N>* = nullptr> | |
auto constexpr& operator[](constant<I>) | |
{ return val_; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> | |
// | |
template <class F, class... Args, | |
class = decltype(std::declval<F&&>()(std::declval<Args&&>()...))> | |
auto constexpr is_valid_impl(int) | |
{ return true; } | |
template <class F, class... Args> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> | |
#include <iterator> | |
#include <array> | |
#include <string_view> | |
// | |
template <auto...> | |
struct auto_list | |
{}; |
OlderNewer