Boost C++ Libraries: Ticket #7317: [type_traits] remove_const not working on vc11 https://svn.boost.org/trac10/ticket/7317 <p> One of proto's tests is currently failing on vc11 with the following error: </p> <pre class="wiki">external_transforms.cpp C:\local\Regression\boost\boost/type_traits/remove_const.hpp(52) : error C2039: 'unqualified_type' : is not a member of 'boost::detail::cv_traits_imp&lt;T&gt;' with [ T=void (__cdecl *const *)(void) ] C:\local\Regression\boost\boost/type_traits/remove_const.hpp(73) : see reference to class template instantiation 'boost::detail::remove_const_impl&lt;T&gt;' being compiled with [ T=void (__cdecl *const )(void) ] </pre><p> John, can you have a look? The proto test in question is external_transforms if you need a repro. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7317 Trac 1.4.3 John Maddock Sun, 02 Sep 2012 08:56:26 GMT <link>https://svn.boost.org/trac10/ticket/7317#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:1</guid> <description> <p> Eric I'm not sure what I can do here: I don't have that compiler (and won't until they decide to release the desktop express edition), but more particularly it looks like a clear compiler bug. That code has been unchanged since the beginning of time and always worked well too. Do you have VC11? If so you could try adding a: </p> <p> template &lt;typename T&gt; struct cv_traits_imp&lt;T*const*&gt; { </p> <blockquote> <p> BOOST_STATIC_CONSTANT(bool, is_const = true); BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T* unqualified_type; </p> </blockquote> <p> }; </p> <p> partial specialization to cv_traits_imp.hpp and see if that helps? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Mon, 03 Sep 2012 01:32:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7317#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:2</guid> <description> <p> I don't have a copy of vc11 either. Could very well be a regression in the compiler. I suppose you could post a msg to the devel list and see if anybody is willing to try the fix for you. And once the compiler is publicly available, we can come up with a minimal repro and file a compiler bug. I'd think they'd want to fix this one if it's a regression that affects boost. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Mon, 24 Sep 2012 21:46:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7317#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:3</guid> <description> <p> I downloaded the free version of msvc-11 and isolated the bug. It does appear to be a regression in the msvc compiler. I've reported it here: </p> <p> <a class="ext-link" href="https://connect.microsoft.com/VisualStudio/feedback/details/764446/regression-cannot-partially-specialize-class-on-ptr-to-funtion-when-function-type-is-deduced#details"><span class="icon">​</span>https://connect.microsoft.com/VisualStudio/feedback/details/764446/regression-cannot-partially-specialize-class-on-ptr-to-funtion-when-function-type-is-deduced#details</a> </p> <p> I'll see if I can come up with a work-around. It'd be nice to get this fixed for 1.52. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Mon, 24 Sep 2012 22:40:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7317#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:4</guid> <description> <p> I haven't added a test for this because it looks like you have a TT testing system that I haven't grokked. But here is a very simple test case that should expose the problem. </p> <pre class="wiki">#include &lt;boost/type_traits/remove_const.hpp&gt; struct S { template&lt;typename T&gt; typename boost::remove_const&lt;T&gt;::type *operator=(T const &amp;t) const { return 0; } }; void bar() {} int main() { S s; s = bar; } </pre><p> With the patch, this compiles. Without it, it doesn't. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Mon, 24 Sep 2012 22:50:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7317#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:5</guid> <description> <p> Oh wait. This introduces a couple of regressions I need to investigate. I'll get back to this. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Tue, 25 Sep 2012 19:02:45 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/7317 https://svn.boost.org/trac10/ticket/7317 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">cv_traits_imp.patch</span> </li> </ul> <p> latest version of the patch </p> Ticket Eric Niebler Tue, 25 Sep 2012 19:05:42 GMT <link>https://svn.boost.org/trac10/ticket/7317#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7317#comment:6</guid> <description> <p> OK, the attached patch seems to do the trick and doesn't introduce regressions as far as I can tell. I think that a better fix would be to simply defer to std::remove_const and friends. But then, that could be done for all traits that have compatible C++11 implementations. That seemed like a bigger change. I'll leave that up to you. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 22 Apr 2014 08:23:39 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7317#comment:7 https://svn.boost.org/trac10/ticket/7317#comment:7 <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> <p> A little late in the day, but patches tested and applied to develop. </p> Ticket