Subject: [Boost-bugs] [Boost C++ Libraries] #8468: Compile error on visual studio 2010/2012 using vector with custom allocator and aligned types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-21 22:19:51
#8468: Compile error on visual studio 2010/2012 using vector with custom allocator
and aligned types
-----------------------------------------------------------+----------------
Reporter: Rosario Leonardi <rosario.leonardi@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
Version: Boost Release Branch | Severity: Problem
Keywords: |
-----------------------------------------------------------+----------------
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:
{{{
template<typename Fun>
struct funwrap2_construct
: Fun
{
funwrap2_construct();
using Fun::construct;
private_type construct(dont_care& , dont_care&) const;
};
struct testConstruct
{
typedef funwrap2_construct< Foo > FunWrap;
static bool const value =
sizeof(no_type) == sizeof(is_private_type( (std::declval<
FunWrap > ().construct(std::declval<MyObj *>(), std::declval<const
MyObj&>() ), 0)));
};
}}}
where MyObj 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.
struct dont_care should have a templated constructor like boost::any.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8468> 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:12 UTC