Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:54

0001 #ifndef GENERS_UNORDERED_SETIO_HH_
0002 #define GENERS_UNORDERED_SETIO_HH_
0003 
0004 #include "Alignment/Geners/interface/CPP11_config.hh"
0005 #ifdef CPP11_STD_AVAILABLE
0006 
0007 #include <unordered_set>
0008 #include "Alignment/Geners/interface/GenericIO.hh"
0009 #include "Alignment/Geners/interface/specialize_hash_io.hh"
0010 
0011 namespace gs {
0012     template <class T, class Hash, class Pred, class Alloc>
0013     struct InsertContainerItem<std::unordered_set<T,Hash,Pred,Alloc> >
0014     {
0015         typedef std::unordered_set<T,Hash,Pred,Alloc> A;
0016         static inline void insert(A& obj, const typename A::value_type& item,
0017                                   const std::size_t /* itemNumber */)
0018         {obj.insert(item);}
0019     };
0020 
0021     template <class T, class Hash, class Pred, class Alloc>
0022     struct InsertContainerItem<volatile std::unordered_set<T,Hash,Pred,Alloc> >
0023     {
0024         typedef std::unordered_set<T,Hash,Pred,Alloc> A;
0025         static inline void insert(A& obj, const typename A::value_type& item,
0026                                   const std::size_t /* itemNumber */)
0027         {obj.insert(item);}
0028     };
0029 
0030     template <class T, class Hash, class Pred, class Alloc>
0031     struct InsertContainerItem<std::unordered_multiset<T,Hash,Pred,Alloc> >
0032     {
0033         typedef std::unordered_multiset<T,Hash,Pred,Alloc> A;
0034         static inline void insert(A& obj, const typename A::value_type& item,
0035                                   const std::size_t /* itemNumber */)
0036         {obj.insert(item);}
0037     };
0038 
0039     template <class T, class Hash, class Pred, class Alloc>
0040     struct InsertContainerItem<volatile std::unordered_multiset<T,Hash,Pred,Alloc> >
0041     {
0042         typedef std::unordered_multiset<T,Hash,Pred,Alloc> A;
0043         static inline void insert(A& obj, const typename A::value_type& item,
0044                                   const std::size_t /* itemNumber */)
0045         {obj.insert(item);}
0046     };
0047 }
0048 
0049 gs_specialize_template_id_TTTT(std::unordered_set, 0, 2)
0050 gs_specialize_template_id_TTTT(std::unordered_multiset, 0, 2)
0051 
0052 #endif // CPP11_STD_AVAILABLE
0053 #endif // GENERS_UNORDERED_SETIO_HH_
0054