Boost logo

Boost Users :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2006-07-24 23:58:09


Andriy Tylychko writes:
> Reading "C++ Template Metaprogramming" book:
>
> "Though not extensible, range_c supports pop_front and pop_back, because
> contracting a range is easy"
>
> But following code doesn't work (at least using MSVC 8.0):
>
> #include <boost/mpl/range_c.hpp>
> #include <boost/mpl/pop_back.hpp>
>
> using namespace boost::mpl;
>
> typedef range_c<int, 0, 1> r;
> typedef pop_back<r>::type p;
>
> Can anybody explain?

I'm afraid you've found a discrepancy between what was planned and
what was actually implemented: the current 'range_c' implementation
simply does not provide the code required to make the above work.

I've put the issue on the library's TODO list
(http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?MPL_TODO_List).
Patches are always welcome!

Thanks for the report,

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

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