Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-12-16 07:03:41


Angus Leeming wrote:

> Actually, this patch seems to do the trick and enables my real code
> to compile too.

> - struct true_type { enum { value = true }; };
> - struct false_type { enum { value = false }; };
> +// struct true_type { enum { value = true }; };
> +// struct false_type { enum { value = false }; };

But 'boost/pending/property.hpp' uses those types and will be broken. At the
very least, the following addition is needed:

--- pending/property.hpp 17 Feb 2003 07:58:00 -0000 1.15
+++ pending/property.hpp 16 Dec 2003 11:59:56 -0000
@@ -1,7 +1,9 @@
 #ifndef BOOST_PROPERTY_HPP
 #define BOOST_PROPERTY_HPP

-#include <boost/pending/ct_if.hpp>
+// For BOOST_STATIC_CONSTANT
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>

 namespace boost {

@@ -38,12 +40,12 @@
   template <class P>
   struct has_property {
     BOOST_STATIC_CONSTANT(bool, value = true);
- typedef true_type type;
+ typedef mpl::bool_<true> type;
   };
   template <>
   struct has_property<no_property> {
     BOOST_STATIC_CONSTANT(bool, value = false);
- typedef false_type type;
+ typedef mpl::bool_<false> type;
   };

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk