[mpl] pop_back<range_c> is forbidden?
Hi.
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
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
#include using namespace boost::mpl;
typedef range_c
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
participants (2)
-
Aleksey Gurtovoy
-
Andriy Tylychko (mail.ru)