clang-tools 20.0.0git
Public Member Functions | List of all members
clang::clangd::Key< Type > Class Template Reference

Values in a Context are indexed by typed keys. More...

#include <Context.h>

Inheritance diagram for clang::clangd::Key< Type >:
Inheritance graph
[legend]

Public Member Functions

constexpr Key ()=default
 
 Key (Key const &)=delete
 
Keyoperator= (Key const &)=delete
 
 Key (Key &&)=delete
 
Keyoperator= (Key &&)=delete
 

Detailed Description

template<class Type>
class clang::clangd::Key< Type >

Values in a Context are indexed by typed keys.

Key<T> serves two purposes:

Example: Key<int> RequestID; Key<int> Version;

Context Ctx = Context::empty().derive(RequestID, 10).derive(Version, 3); assert(*Ctx.get(RequestID) == 10); assert(*Ctx.get(Version) == 3);

Keys are typically used across multiple functions, so most of the time you would want to make them static class members or global variables.

Definition at line 40 of file Context.h.

Constructor & Destructor Documentation

◆ Key() [1/3]

template<class Type >
constexpr clang::clangd::Key< Type >::Key ( )
constexprdefault

◆ Key() [2/3]

template<class Type >
clang::clangd::Key< Type >::Key ( Key< Type > const &  )
delete

◆ Key() [3/3]

template<class Type >
clang::clangd::Key< Type >::Key ( Key< Type > &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

template<class Type >
Key & clang::clangd::Key< Type >::operator= ( Key< Type > &&  )
delete

◆ operator=() [2/2]

template<class Type >
Key & clang::clangd::Key< Type >::operator= ( Key< Type > const &  )
delete

The documentation for this class was generated from the following file: