ATLAS Offline Software
Loading...
Searching...
No Matches
KeyConcept.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CONSTRAINTS_KEYCONCEPT_H
6#define CONSTRAINTS_KEYCONCEPT_H
7#include <string>
8#include <concepts>
9#include <type_traits>
10
11template <typename T> struct is_char_array : std::false_type {};
12
13template <std::size_t N> struct is_char_array<char[N]> : std::true_type {};
14
15//CONCEPT
16template <class T, class ID=std::string >
17concept KeyConcept =
18 std::is_arithmetic_v<T> || is_char_array<T>::value || std::convertible_to<T, ID> ;
19
20#endif
21
22
23
24
25
26
27