ATLAS Offline Software
AuxElementConcepts.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4  */
21 #ifndef ATHCONTAINERS_AUXELEMENTCONCEPTS_H
22 #define ATHCONTAINERS_AUXELEMENTCONCEPTS_H
23 
24 
27 #include "CxxUtils/concepts.h"
28 
29 
30 namespace SG {
31 
32 
33 #if HAVE_CONCEPTS
34 
35 
37 template <class T>
38 concept IsConstAuxElement =
39  requires (const T& elt)
40  {
41  { elt } -> std::convertible_to<const IAuxElement&>;
42  { elt.container() } -> std::convertible_to<const AuxVectorData*>;
43  };
44 
45 
47 template <class T>
48 concept IsAuxElement =
49  requires (T& elt)
50  {
51  { elt } -> std::convertible_to<IAuxElement&>;
52  { elt.container() } -> std::convertible_to<AuxVectorData*>;
53  };
54 
55 
56 #endif
57 
58 
59 } // namespace SG
60 
61 
62 #endif // not ATHCONTAINERS_AUXELEMENTCONCEPTS_H
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
IAuxElement.h
Flag that a class may have auxiliary data associated with it.
AuxVectorData.h
Manage lookup of vectors of auxiliary data.
concepts.h
Compatibility helpers for using some pieces of C++20 concepts with older compilers.