Re: [Boost-bugs] [Boost C++ Libraries] #4874: multi_array compile errors using Visual C++ 2010 in debug mode

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4874: multi_array compile errors using Visual C++ 2010 in debug mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-15 10:49:56


#4874: multi_array compile errors using Visual C++ 2010 in debug mode
-------------------------------+--------------------------------------------
  Reporter: chrislu | Owner: garcia
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multi_array
   Version: Boost 1.47.0 | Severity: Showstopper
Resolution: | Keywords: multi_array, Visual Studio 2010, Visual C++ 2010
-------------------------------+--------------------------------------------

Comment (by Dr. Sergey Kiselev <SergK13Stuff@…>):

 There is a comment from Microsoft support:

 http://connect.microsoft.com/VisualStudio/feedback/details/687655
 /compilation-issue-in-debug-mode-with-boost-library

 (IDL refers to _ITERATOR_DEBUG_LEVEL, which is 0 in release mode and 2 in
 debug mode.)

 --
 The problem is that multi_array iterators report themselves as input
 iterators, which can't be written to (e.g. as the destination of a
 copy()). Under IDL=0, copy() doesn't actually care how its destination
 iterator is marked with an iterator category tag, it just tries to write
 to the destination iterator, and that works. Under IDL > 0, copy() wants
 to know whether its source and destination iterators are both random-
 access, in which case it can perform a range check and unwrap the
 destination iterator for increased performance. It does this by
 overloading foo(input_iterator_tag, output_iterator_tag) and
 foo(random_access_iterator_tag, random_access_iterator_tag) and calling
 foo(category(source), category(destination)). If both source and
 destination are random-access, both overloads are viable (i.e. callable)
 and the second overload is preferred, so it's actually called. Otherwise,
 source is required to be at least an input iterator (maybe stronger) and
 destination is required to be at least an output iterator (maybe stronger)
 so the first overload must be viable and the second overload will be non-
 viable, so the first overload wins by default.

 However, if the destination is not marked as an output iterator or
 stronger, then the first overload is non-viable as well as the second, so
 overload resolution fails and boom.

 Stephan T. Lavavej
 Visual C++ Libraries Developer

 --


 So based on that comment I only can add the only solution would be the one
 provided by r.undheim.

 And again all version of boost do not compatible with Visual Studio 2010
 (till 1.47.0 at least).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4874#comment:10>
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:07 UTC