00001 #ifndef DVXML_NOCONST_H 00002 #define DVXML_NOCONST_H 00003 // $Id: noconst.h,v 1.3 2003/06/01 08:23:24 dvermeir Exp $ 00004 00005 namespace Dv { 00006 namespace Xml { 00007 00008 /** Utility template: noconst<T>::mutable_type is T if T is not 00009 * "const" and X if T is "const X". 00010 */ 00011 template<typename T> 00012 struct noconst { 00013 /** Mutable_type is T if T is not "const" and X if T is "const X". */ 00014 typedef T mutable_type; 00015 }; 00016 00017 /** Utility template: noconst<T>::mutable_type is T if T is not 00018 * "const" and X if T is "const X". 00019 */ 00020 template<typename T> 00021 struct noconst<const T> { 00022 /** Mutable_type is T if T is not "const" and X if T is "const X". */ 00023 typedef T mutable_type; 00024 }; 00025 00026 /** Utility template: noconst<T>::mutable_type is T if T is not 00027 * "const" and X if T is "const X". 00028 */ 00029 template<typename T> 00030 struct noconst<T*> { 00031 /** Mutable_type is T if T is not "const" and X if T is "const X". */ 00032 typedef void mutable_type; 00033 }; 00034 00035 }} 00036 #endif
dvxml-0.1.4 | [19 September, 2003] |