/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DataFormats/Common/interface/HolderToVectorTrait_RefProd_specialization.h
58 строк
2 KB
W. David Dagenhart
From scram b code-format-all (clang-format)
10 май 2019, 17:51
10 май 2019, 17:51
82e0ab0
Код
Авторство
О чём код?
#ifdef DataFormats_Common_HolderToVectorTrait_h #ifdef DataFormats_Common_RefProd_h #ifndef DataFormats_Common_HolderToVectorTrait_RefProd_specialization_h #define DataFormats_Common_HolderToVectorTrait_RefProd_specialization_h // -*- C++ -*- // // Package: DataFormats/Common // /** Description: Specialization of HolderToVectorTrait for edm::RefProd Usage: Only if both DataFormats/Common/interface/HolderToVectorTrait.h and DataFormats/Common/interface/RefProd.h are include in a file will this code be seen. */ // // Original Author: Chris Jones // Created: Thu, 20 Nov 2014 21:44:59 GMT // #include <memory> namespace edm { namespace reftobase { template <typename T> struct RefProdHolderToVector { static std::unique_ptr<BaseVectorHolder<T> > makeVectorHolder() { Exception::throwThis(errors::InvalidReference, "attempting to make a BaseVectorHolder<T> from a RefProd<C>.\n"); return std::unique_ptr<BaseVectorHolder<T> >(); } }; template <typename C, typename T> struct HolderToVectorTrait<T, RefProd<C> > { typedef RefProdHolderToVector<T> type; }; struct RefProdRefHolderToRefVector { static std::unique_ptr<RefVectorHolderBase> makeVectorHolder() { Exception::throwThis(errors::InvalidReference, "attempting to make a BaseVectorHolder<T> from a RefProd<C>.\n"); return std::unique_ptr<RefVectorHolderBase>(); } }; template <typename C> struct RefHolderToRefVectorTrait<RefProd<C> > { typedef RefProdRefHolderToRefVector type; }; } // namespace reftobase } // namespace edm #endif #endif #endif