Boost C++ Libraries: Ticket #6051: iT::value_type should use iterator_traits (needed for SunCC/stlport4 compatibility) https://svn.boost.org/trac10/ticket/6051 <p> polygon/gtl_boost_unit_test fails to compile with SunCC giving among anything else the following diagnostics: </p> <pre class="wiki">] sunCC -library=stlport4 -I. libs/polygon/test/gtl_boost_unit_test.cpp -c ... "./boost/polygon/polygon_traits.hpp", line 1039: Error: boost::polygon::iT is not a namespace or class name. "./boost/polygon/polygon_traits.hpp", line 1067: Where: While instantiating "boost::polygon::point_sequence_is_45&lt;const boost::polygon::point_data&lt;int&gt;*&gt;(const boost::polygon::point_data&lt;int&gt;*, const boost "./boost/polygon/polygon_traits.hpp", line 1067: Where: Instantiated from boost::polygon::is_45&lt;boost::polygon::polygon_45_data&lt;int&gt;&gt;(const boost::polygon::polygon_45_data&lt;int&gt;&amp;). "libs/polygon/test/gtl_boost_unit_test.cpp", line 1537: Where: Instantiated from non-template code. "./boost/polygon/polygon_traits.hpp", line 1039: Error: value_type is not defined. "./boost/polygon/polygon_traits.hpp", line 1067: Where: While instantiating "boost::polygon::point_sequence_is_45&lt;const boost::polygon::point_data&lt;int&gt;*&gt;(const boost::polygon::point_data&lt;int&gt;*, const boost "./boost/polygon/polygon_traits.hpp", line 1067: Where: Instantiated from boost::polygon::is_45&lt;boost::polygon::polygon_45_data&lt;int&gt;&gt;(const boost::polygon::polygon_45_data&lt;int&gt;&amp;). "libs/polygon/test/gtl_boost_unit_test.cpp", line 1537: Where: Instantiated from non-template code. "./boost/polygon/point_traits.hpp", line 16: Error: boost::polygon::T is not a namespace or class name. "./boost/polygon/polygon_traits.hpp", line 1040: Where: While specializing "boost::polygon::point_traits&lt;int&gt;". "./boost/polygon/polygon_traits.hpp", line 1040: Where: Instantiated from boost::polygon::point_sequence_is_45&lt;const boost::polygon::point_data&lt;int&gt;*&gt;(const boost::polygon::point_data&lt;int&gt;*, const boost::p "./boost/polygon/polygon_traits.hpp", line 1067: Where: Instantiated from boost::polygon::is_45&lt;boost::polygon::polygon_45_data&lt;int&gt;&gt;(const boost::polygon::polygon_45_data&lt;int&gt;&amp;). "libs/polygon/test/gtl_boost_unit_test.cpp", line 1537: Where: Instantiated from non-template code. ... ] </pre><p> That all happens because boost/polygon in a couple of places uses iT::value_type construct, which is a non-standard way to query value_type iterator trait. It works with g++, but it does not work with stlport (at least with stlport4 shipped with SunCC). </p> <pre class="wiki">] git grep iT::value_type -- boost/polygon boost/polygon/polygon_45_set_data.hpp: typedef typename iT::value_type Point; boost/polygon/polygon_traits.hpp: typedef typename iT::value_type Point; ] </pre><p> These should be converted to a standard way of querying iterator traits used throught all the boost (and polygon in particular) - <strong>std::iterator_traits&lt;iT&gt;::value_type</strong> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6051 Trac 1.4.3 Fedor Sergeev <Fedor.Sergeev@…> Mon, 24 Oct 2011 18:48:47 GMT attachment set https://svn.boost.org/trac10/ticket/6051 https://svn.boost.org/trac10/ticket/6051 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">diffs</span> </li> </ul> <p> patch for iT::value_type </p> Ticket anonymous Tue, 25 Oct 2011 17:01:23 GMT <link>https://svn.boost.org/trac10/ticket/6051#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6051#comment:1</guid> <description> <p> Thanks, I was just having this exact problem. But googling boost polygon stlport turned up your solution - posted only 21 hours before! This kind of thing (fixes only a few hours or days before I hit a problem) seems like it happens too often to be coincidence. </p> <p> If it helps anyone, I was having the problem on Windows 7 with ICL (intel compiler) v12.1, and STLPort 5.2.1. Perhaps boost should test with STLPort. </p> <ul><li>Daniel Faken </li></ul> </description> <category>Ticket</category> </item> <item> <author>sydorchuk.andriy@…</author> <pubDate>Mon, 17 Sep 2012 22:06:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6051#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6051#comment:2</guid> <description> <p> Will be fixed in Boost 1.52. </p> <p> Andrii Sydorchuk </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Lucanus Simonson</dc:creator> <pubDate>Wed, 19 Sep 2012 00:36:49 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6051#comment:3 https://svn.boost.org/trac10/ticket/6051#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket