This file contains hidden or 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
| // Copyright (c) October 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| namespace exotic::internal::foo { | |
| namespace detail { | |
| template<typename T> | |
| struct impl { | |
| using value_type = T; |
This file contains hidden or 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
| // Copyright (c) October 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| namespace exotic { | |
| template<template<typename> typename...> | |
| struct transform_tuple_using; | |
| template<template<typename> typename Metafunction> | |
| struct transform_tuple_using<Metafunction> { |
This file contains hidden or 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
| // Copyright (c) 2026 Félix-Olivier Dumas. | |
| // Free to use, modify, and distribute for educational or commercial purposes. | |
| // Reference example of the SPO pattern (simplified form) | |
| namespace exotic { | |
| template<template<typename> typename Target, typename Source> | |
| [[nodiscard]] constexpr auto& view_cast(Source& src) noexcept { | |
| return reinterpret_cast<Target<Source>&>(src); |
This file contains hidden or 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
| // Copyright (c) September 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| // using x86-64 clang (reflection - C++26) [-freflection-latest -std=c++26] | |
| #include <experimental/meta> | |
| #include <iostream> | |
| #include <string_view> | |
| struct Point { |
This file contains hidden or 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
| // Copyright (c) July 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| template<typename entry_tuple> | |
| struct TokenKeywordCategorizerConfigurationSchema { | |
| using first_t = std::decay_t<std::tuple_element_t<0, entry_tuple>>; | |
| using second_t = std::decay_t<std::tuple_element_t<1, entry_tuple>>; | |
| static constexpr bool valid = | |
| requires { |
This file contains hidden or 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
| // Copyright (c) July 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| template<typename entry_tuple> | |
| struct EnumMapperConfigurationSchema { | |
| using first_t = std::decay_t<std::tuple_element_t<0, entry_tuple>>; | |
| using second_t = std::decay_t<std::tuple_element_t<1, entry_tuple>>; | |
| static constexpr bool valid = | |
| requires { |
This file contains hidden or 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
| // Copyright (c) July 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| template<std::size_t R, std::size_t C> | |
| struct StaticMatrix final { | |
| public: | |
| template<typename... Args> | |
| requires (sizeof...(Args) == (R * C)) | |
| && (std::convertible_to<Args, int> && ...) | |
| consteval StaticMatrix(Args... entries) |
This file contains hidden or 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
| // Copyright (c) July 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| #if !defined(__INTELLISENSE__) | |
| using LexingAutomaton__final = StaticDFA< | |
| generate_expanded_dfa_config_t< | |
| ENABLED <nttp_to_type<LexState::Start>, charset_alpha, nttp_to_type<LexState::Identifier>>, | |
| ENABLED <nttp_to_type<LexState::Start>, charset_digits, nttp_to_type<LexState::Number>>, | |
| ENABLED <nttp_to_type<LexState::Start>, charset<':'>, nttp_to_type<LexState::DelimiterColon>>, |
This file contains hidden or 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
| // Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| #pragma once | |
| #include <cstddef> | |
| #include <stdexcept> | |
| #include <atomic> | |
| #include <iostream> | |
| #include <new> |
This file contains hidden or 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
| // Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved. | |
| // Licensed under the terms described in the LICENSE file | |
| // Reference example of the pattern | |
| // See: https://medium.com/@felixolivierdumas/exotic-crtp-rethinking-static-polymorphism-with-c-23-89f9e75e8ffd | |
| #pragma once | |
| #include <iostream> | |
| #include <type_traits> |
NewerOlder