Subject: [boost] [Range] Non-mutating algorithm on non const qualified range
From: Albert Yiamakis (vkicefire_at_[hidden])
Date: 2014-03-24 03:06:50
In the users mailing list I have remarked that this piece of code:
will fail to compile, without providing 'mutable' iterators.
I have since found out it will also compile by simply const qualifying
the dummy object. (ie const Dummy dummy;)
The reason is that without it this:
is_const<Dummy> gets evaluated to false, resulting in
Surely this is not intended behavior and it should be possible to use a
range that has only const iterators in a non-mutating algorithm without
const qualifying it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk