2024-05-31 22:59:00 -04:00
|
|
|
#ifndef RFL_INTERNAL_DEFINELITERAL_HPP_
|
|
|
|
#define RFL_INTERNAL_DEFINELITERAL_HPP_
|
|
|
|
|
|
|
|
#include "../Literal.hpp"
|
|
|
|
|
|
|
|
namespace rfl {
|
2024-06-08 14:10:59 -04:00
|
|
|
namespace internal {
|
2024-05-31 22:59:00 -04:00
|
|
|
|
2024-06-08 14:10:59 -04:00
|
|
|
/// Allows you to combine several literals.
|
|
|
|
template <class... LiteralTypes>
|
|
|
|
struct define_literal;
|
2024-05-31 22:59:00 -04:00
|
|
|
|
2024-06-08 14:10:59 -04:00
|
|
|
/// General case
|
2024-06-16 00:13:15 -04:00
|
|
|
template <StringLiteral... _content1, StringLiteral... _content2, class... Tail>
|
|
|
|
struct define_literal<Literal<_content1...>, Literal<_content2...>, Tail...> {
|
|
|
|
using type = typename define_literal<Literal<_content1..., _content2...>, Tail...>::type;
|
2024-06-08 14:10:59 -04:00
|
|
|
};
|
2024-05-31 22:59:00 -04:00
|
|
|
|
2024-06-08 14:10:59 -04:00
|
|
|
/// Special case - only a single literal is left
|
|
|
|
template <StringLiteral... _content>
|
|
|
|
struct define_literal<Literal<_content...>> {
|
|
|
|
using type = Literal<_content...>;
|
|
|
|
};
|
2024-05-31 22:59:00 -04:00
|
|
|
|
2024-06-08 14:10:59 -04:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace rfl
|
2024-05-31 22:59:00 -04:00
|
|
|
|
|
|
|
#endif
|