Template Function lsst::afw::typehandling::makeKey

Function Documentation

template<typename V, typename K>
constexpr Key<K, V> makeKey(K const &id)

Factory function for Key, to enable type parameter inference.

Provides the same exception safety as the copy-constructor of

K.
Return

a key of the desired type

Parameters
  • id: the key ID to create.

Calling this function prevents you from having to explicitly name the key type:

auto key = makeKey<int>("foo");