Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl::print] Making mpl::print<> function
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-09-01 13:45:52


> I have the following which I expect to produce a compile time warning
> which
> includes the type name but it fails to do so. I found this in the C++
> Template Metaprogramming book - but not in the MPL documentation. What
> am I
> missing here?
>
> Robert Ramey
>
> #include <boost/mpl/print.hpp>
> template<class T>
> int f(){
> boost::mpl::print<T>;

Try:

    boost::mpl::print<T> abc;

instead

> //static int x = g<T::value>();
> return x;
> }
>
> struct A {
> BOOST_STATIC_CONSTANT(bool, value = false);
> };
>
> ...
> int x = f<A>();

Regards Hartmut


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net