[graph] msvc compile failure with filtered_graph and dijkstra

Hi, some of our old graph algorithm seems to have broken using msvc with 1.51. The failure can be reproduced with the attached testcase on trunk and 1.51. The error starts with E:\Home\hunold\src\devel\boost\boost/graph/properties.hpp(222) : error C2039: 'type' : is not a member of 'boost::vertex_property_type<G>' which point in the direction of the last changes to properties.hpp. The test code break with msvc-9.0 (full error included) and msvc-11.0. Everything compiles with gcc-4.6.2 on Kubuntu 12.04 and mingw-w64. Any ideas what msvc does not grok here? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

On Mon, 8 Oct 2012, Jürgen Hunold wrote:
It looks like VC++ isn't able to deduce that when calling: template <typename G> ... const G& ... that G should not be a const-qualified type. Please check if trunk version 80908 works for you (I don't have an easy way to test on Visual C++). -- Jeremiah Willcock

Hi Jeremiah, On Monday, 8. October 2012 16:05:30 Jeremiah Willcock wrote:
Sorry, that does not fix the problem. Same errors as before. You can also send patches if I shall test something for you. One hint might be the following buried inside the error messages: E:\Home\hunold\src\devel\boost\boost/graph/properties.hpp(223) : error C2955: 'boost::type' : use of class template requires template argument list E:\Home\hunold\src\devel\boost\boost/type.hpp(14) : see declaration of 'boost::type' <boost/type.hpp> really declares a class template named "type" as follows: // Just a simple "type envelope". Useful in various contexts, mostly to work // around some MSVC deficiencies. template <class T> struct type {}; I get the feeling that msvc simply gets confused and fails to recognize the difference between the "struct type" and the nested typedefs also named "x::type". But I might be wrong here and this is a red herring. Thanks for the help! Yours, Jürgen - * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

On Mon, 8 Oct 2012, Jürgen Hunold wrote:
Exactly the same (same "const filtered_graph" stuff in the beginning) as before?
It might be related; maybe the compiler is failing to find the member then looking for a namespace-scope class instead or something. -- Jeremiah Willcock

Hi Jeremiah, On Monday, 8. October 2012 17:02:56 Jeremiah Willcock wrote:
Yes, exactly. ediff'ed both logs, new log attached. Sorry, should have attached it firsthand, it is getting late here.
Template instantiation magic, sigh. Yes, that seems to be an explanation. I should dive into "C++ templates" again... Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

Hi Jeramiah, On Monday, 8. October 2012 23:13:52 Jürgen Hunold wrote:
Hi Jeremiah,
Using "svn bisect" (manually, of course) I managed to pinpoint the issue to r77549 on trunk. This is:
r77549 | jewillco | 2012-03-25 23:03:59 +0200 (So, 25 Mär 2012) | 1 line
Unfortunately, this is quite a large refactoring. My testcase works with 77548 and starts failing with 77549. I hope this information helps to track the issue down. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany
participants (2)
-
Jeremiah Willcock
-
Jürgen Hunold