$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [Container] const boost::container::vector is mutable??
From: Eric Niebler (eniebler_at_[hidden])
Date: 2015-03-30 13:05:40
Why are the elements of a const boost::vector mutable through its
const_iterator?
#include <boost/container/vector.hpp>
int main()
{
using C = boost::container::vector<int>;
C c{1,2,3,4};
C const & r = c;
r[0] = 42; // Error, good.
*r.begin() = 42; // Compiles! huh??
}
-- Eric Niebler Boost.org http://www.boost.org