alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
hasName.hpp
Go to the documentation of this file.
1/* Copyright 2024 René Widera
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
8
9#include <concepts>
10#include <type_traits>
11
12namespace alpaka::concepts
13{
14 /**
15 */
16 template<typename T>
17 concept HasStaticName = requires(T t) {
18 { internal::GetStaticName::Op<std::decay_t<T>>{}(t) } -> std::convertible_to<std::string>;
19 };
20
21 template<typename T>
22 concept HasName = requires(T t) {
23 { internal::GetName::Op<T>{}(t) } -> std::convertible_to<std::string>;
24 };
25} // namespace alpaka::concepts