/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Common/interface/RefKeyTrait.h
39 строк
955 B
W. David Dagenhart
From scram b code-format-all (clang-format)
10 май 2019, 17:51
10 май 2019, 17:51
82e0ab0
Код
Авторство
О чём код?
#ifndef DataFormats_Common_RefKeyTrait_h #define DataFormats_Common_RefKeyTrait_h #include "FWCore/Utilities/interface/EDMException.h" namespace edm { template <typename C> class RefProd; namespace reftobase { struct RefKey { template <typename REF> static size_t key(const REF& r) { return r.key(); } }; struct RefProdKey { template <typename REF> static size_t key(const REF& r) { Exception::throwThis(errors::InvalidReference, "attempting get key from a RefToBase containing a RefProd.\n" "You can use key only with RefToBase containing a Ref."); return 0; } }; template <typename REF> struct RefKeyTrait { typedef RefKey type; }; template <typename C> struct RefKeyTrait<RefProd<C> > { typedef RefProdKey type; }; } // namespace reftobase } // namespace edm #endif