Simple-Utility v2.3.1
Loading...
Searching...
No Matches
unified_base.hpp
Go to the documentation of this file.
1// Copyright Dominic Koepke 2019 - 2023.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// https://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef SL_UTILITY_UNIFIED_BASE_HPP
7#define SL_UTILITY_UNIFIED_BASE_HPP
8
9#pragma once
10
11#include <concepts>
12#include <type_traits>
13
14namespace sl
15{
21 template <class TTag>
22 requires std::is_class_v<TTag> && std::same_as<TTag, std::remove_cvref_t<TTag>>
24 {};
25
33 template <class T, class TTag>
34 concept derived_from_unified_base = std::is_base_of_v<unified_base<TTag>, std::remove_cvref_t<T>>;
35}
36
37#endif
Determines whether T is derived of unified_base with the provided tag type.
Definition: unified_base.hpp:34
Definition: operators.hpp:15
Helper type, which can be used to create a unified base class for templated derived classes and thus ...
Definition: unified_base.hpp:24