Boost C++ Libraries: Ticket #8468: Compile error on visual studio 2010/2012 using vector with custom allocator and aligned types https://svn.boost.org/trac10/ticket/8468 <p> Using boost containers with an allocator that have a construct function I have an error saying that the type can't be aligned. This is caused by boost trying to check if is possible to call construct with the parameter that i pass. In has_member_function_callable_with_construct_impl it try to do something like that: </p> <pre class="wiki">template&lt;typename Fun&gt; struct funwrap2_construct : Fun { funwrap2_construct(); using Fun::construct; private_type construct(dont_care&amp; , dont_care&amp;) const; }; struct testConstruct { typedef funwrap2_construct&lt; Foo &gt; FunWrap; static bool const value = sizeof(no_type) == sizeof(is_private_type( (std::declval&lt; FunWrap &gt; ().construct(std::declval&lt;MyObj *&gt;(), std::declval&lt;const MyObj&amp;&gt;() ), 0))); }; </pre><p> where <a class="missing wiki">MyObj</a> is my aligned class and dontcare is an empty class with ellipse constructor. Ellipse can't be reference and that's why visual studio thinks that FunWrap::construct will use an aligned parameter passed on the stack. </p> <p> struct dont_care should have a templated constructor like boost::any. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8468 Trac 1.4.3 Rosario Leonardi <rosario.leonardi@…> Sun, 21 Apr 2013 22:20:29 GMT attachment set https://svn.boost.org/trac10/ticket/8468 https://svn.boost.org/trac10/ticket/8468 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">has_member_function_callable_with.hpp.patch</span> </li> </ul> Ticket Rosario Leonardi <rosario.leonardi@…> Sun, 21 Apr 2013 22:22:32 GMT <link>https://svn.boost.org/trac10/ticket/8468#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8468#comment:1</guid> <description> <p> Note: No compile error is give by gcc or clang. Probably because the call is erased before type alignment check. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Tue, 18 Mar 2014 16:09:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8468#comment:2 https://svn.boost.org/trac10/ticket/8468#comment:2 <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> Fixed in develop branch. SHA-1: 6c623e8d16254ca21eb40b5a84640fa4eb5518f2* Fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8468" title="#8468: Bugs: Compile error on visual studio 2010/2012 using vector with custom ... (closed: fixed)">#8468</a>. Added 64 bit prime values. </p> Ticket