930: Add constness check.

https://svn.lrde.epita.fr/svn/oln/trunk/metalic Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Add constness check. * mlc/cmp.hh (mlc_is_const, is_const_): New. cmp.hh | 15 +++++++++++++++ 1 files changed, 15 insertions(+) Index: mlc/cmp.hh --- mlc/cmp.hh (revision 929) +++ mlc/cmp.hh (working copy) @@ -64,6 +64,8 @@ # define mlc_is_builtin(T) mlc::is_builtin_< T > # define mlc_is_not_builtin(T) mlc::is_not_builtin_< T > +# define mlc_is_const(T) mlc::is_const_< T > + /// \} @@ -216,6 +218,19 @@ /// \} + /// Check whether a type is const. + /// \{ + template <typename T> + struct is_const_ : public bexpr_<false> + { + }; + + template <typename T> + struct is_const_ <const T> : public bexpr_<true> + { + }; + /// \} + /// Check whether a type is a builtin type. /// \{
participants (1)
-
Thierry Geraud