Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GENERS_INT2TYPE_HH_
0002 #define GENERS_INT2TYPE_HH_
0003 
0004 #include <sstream>
0005 
0006 namespace gs {
0007   namespace Private {
0008     inline std::string makeInt2TypeStage(const int v) {
0009       std::ostringstream os;
0010       os << "Int2Type::" << v;
0011       return os.str();
0012     }
0013   }  // namespace Private
0014 
0015   template <int v>
0016   struct Int2Type {
0017     enum { value = v };
0018 
0019     static const char *stage() {
0020       static const std::string buf(Private::makeInt2TypeStage(v));
0021       return buf.c_str();
0022     }
0023   };
0024 }  // namespace gs
0025 
0026 #endif  // GENERS_INT2TYPE_HH_