Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3298: Iterating over a map fails to compile with MSVC 9 (works with CYGWIN GCC 4.3.2)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-29 14:09:09
#3298: Iterating over a map fails to compile with MSVC 9 (works with CYGWIN GCC
4.3.2)
---------------------------------------------------------------+------------
Reporter: Marshall Galbraith <Marshall.Galbraith@â¦> | Owner: agurtovoy
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: mpl
Version: Boost 1.39.0 | Severity: Showstopper
Keywords: map |
---------------------------------------------------------------+------------
Comment(by Marshall Galbraith):
First I want to acknowledge that I am an MPL novice, and am still learning
the ropes of this extremely useful library. I have attached an updated
example of the problem. This implementation takes better advantage of the
tools provided in the mpl library.
I have two template meta functions defined in this example which joins two
maps, MapL and MapR. The first function, join_maps_1, generates a new copy
of the joint maps using copy and joint_view. If I understand things
correctly, this requires size<MapL> + size<MapR> instantiations. This
version seems to work without problems.
The second function, join_maps_2, inserts MapR into MapL using copy<>. It
should require size<MapL> instantiations. However, if the resulting map is
passed to for_each<>, the code fails to compile with MSVC 9 if a key has
been erase from MapL.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3298#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC