https://svn.lrde.epita.fr/svn/oln/trunk/metalic
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add ''non-reference'' check.
* mlc/cmp.hh (mlc_is_not_reference): New.
(is_not_const_): Update.
cmp.hh | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletion(-)
Index: mlc/cmp.hh
--- mlc/cmp.hh (revision 942)
+++ mlc/cmp.hh (working copy)
@@ -67,6 +67,7 @@
# define mlc_is_const(T) mlc::is_const_< T >
# define mlc_is_not_const(T) mlc::is_not_const_< T >
# define mlc_is_reference(T) mlc::is_reference_< T >
+# define mlc_is_not_reference(T) mlc::is_not_reference_< T >
/// \}
@@ -233,7 +234,12 @@
};
template <typename T>
- struct is_not_const_ : public not_< is_const_<T> >::bexpr
+ struct is_not_const_ : public bexpr_<true>
+ {
+ };
+
+ template <typename T>
+ struct is_not_const_< const T > : public bexpr_<false>
{
};
/// \}
@@ -251,6 +257,16 @@
struct is_reference_< T& > : public bexpr_<true>
{
};
+
+ template <typename T>
+ struct is_not_reference_ : public bexpr_<true>
+ {
+ };
+
+ template <typename T>
+ struct is_not_reference_< T& > : public bexpr_<false>
+ {
+ };
/// \}