/[libvob]/libvob/include/vob/Templates.hxx
ViewVC logotype

Diff of /libvob/include/vob/Templates.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Thu Feb 27 05:32:19 2003 UTC revision 1.2 by tjl, Fri Apr 4 12:34:59 2003 UTC
# Line 39  namespace Templates { Line 39  namespace Templates {
39      template <int v> struct Int2Type {      template <int v> struct Int2Type {
40          enum { value = v } ;          enum { value = v } ;
41      };      };
42    
43        /** A class which is either empty or contains one
44         * instance of the other class, depending on the boolean.
45         * Used in code :generation.
46         */
47        template <bool really, class C> class IfTempl {
48        };
49    
50        template <class C> struct IfTempl<true, C> {
51            C c;
52            template<class T> IfTempl(T t) : c(t) { }
53            template<class T, class U> IfTempl(T t, U u) : c(t, u) { }
54        };
55        template <class C> struct IfTempl<false, C> {
56            template<class T> IfTempl(T t) { }
57            template<class T, class U> IfTempl(T t, U u) { }
58        };
59  }  }
60  }  }
61    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26