Small nitpick in boost::iterator

Seems boost.Iterator pass some parameter by value in the make(Reference r) function. However, MSVC 2010 and I suspect below dont like passing value which alignment is greater than 8 ( **cough** SIMD vector **cough** ) The fix is trivial, adding const & to this function. Should I go ahead and commit this to trunk ?

On 23/05/2011 19:01, Joel Falcou wrote:
Seems boost.Iterator pass some parameter by value in the make(Reference r) function. However, MSVC 2010 and I suspect below dont like passing value which alignment is greater than 8 ( **cough** SIMD vector **cough** )
The fix is trivial, adding const & to this function. Should I go ahead and commit this to trunk ?
I'm not sure the const is necessary, but the & definitely is.

AMDG On 05/23/2011 10:01 AM, Joel Falcou wrote:
Seems boost.Iterator pass some parameter by value in the make(Reference r) function. However, MSVC 2010 and I suspect below dont like passing value which alignment is greater than 8 ( **cough** SIMD vector **cough** )
The fix is trivial, adding const & to this function. Should I go ahead and commit this to trunk ?
In C++03, Reference const& is ill-formed if Reference is already a reference. In Christ, Steven Watanabe

On 23/05/2011 19:14, Steven Watanabe wrote:
AMDG
On 05/23/2011 10:01 AM, Joel Falcou wrote:
Seems boost.Iterator pass some parameter by value in the make(Reference r) function. However, MSVC 2010 and I suspect below dont like passing value which alignment is greater than 8 ( **cough** SIMD vector **cough** )
The fix is trivial, adding const& to this function. Should I go ahead and commit this to trunk ?
In C++03, Reference const& is ill-formed if Reference is already a reference.
True, typename boost::add_reference<Reference>::type could work instead.

You know the drill: make sure the tests pass, update the docs if necessary, but yeah, please go ahead and fix it. On Mon, May 23, 2011 at 1:01 PM, Joel Falcou <joel.falcou@gmail.com> wrote:
Seems boost.Iterator pass some parameter by value in the make(Reference r) function. However, MSVC 2010 and I suspect below dont like passing value which alignment is greater than 8 ( **cough** SIMD vector **cough** )
The fix is trivial, adding const & to this function. Should I go ahead and commit this to trunk ?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (4)
-
Dave Abrahams
-
Joel Falcou
-
Mathias Gaunard
-
Steven Watanabe