|
||||
File indexing completed on 2025-01-18 10:01:09
0001 #ifndef ENABLE_IF_H 0002 #define ENABLE_IF_H 0003 // author: Walter Brown 0004 0005 // ---------------------------------------------------------------------- 0006 // prolog 0007 0008 namespace HepMC { 0009 namespace detail { 0010 0011 0012 // ---------------------------------------------------------------------- 0013 // enable_if<> 0014 0015 /// internal - used to decide if a class is arithmetic 0016 template< bool, class > 0017 struct enable_if 0018 { }; 0019 0020 /// internal - use if class T is arithmetic 0021 template< class T > 0022 struct enable_if<true, T> 0023 { 0024 typedef T type; //!< check type of class T 0025 }; 0026 0027 0028 // ---------------------------------------------------------------------- 0029 // disable_if<> 0030 0031 /// internal - used by SimpleVector to decide if a class is arithmetic 0032 template< bool, class > 0033 struct disable_if 0034 { }; 0035 0036 /// internal - used by SimpleVector to decide if a class is arithmetic 0037 template< class T > 0038 struct disable_if<false, T> 0039 { 0040 typedef T type; //!< check type of class T 0041 }; 0042 0043 0044 // ---------------------------------------------------------------------- 0045 // epilog 0046 0047 } // namespace detail 0048 } // namespace HepMC 0049 0050 #endif // ENABLE_IF_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |