|
Boost : |
Subject: Re: [boost] [move] [variant] Some problems with VC++10
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2011-08-08 15:18:23
[Antony Polukhin]
> The problem is that VC10 uses move() in it's STL implementation
> without directly specifying namespace. That leads to ambiguity, when
> VC10 containers are used with boost classes.
[Mathias Gaunard]
> Or to get MSVC to qualify std::move.
Yeah, that's a VC bug. We try to be very careful about explicitly qualifying all function calls to avoid unintentional ADL except when ADL customization is specifically desired (e.g. swap), but it's easy to screw up and not notice.
I see the following offenders in VC10 SP1 with grep -dskip -P "\bmove\b" * | grep -vP "//|_STD move|_Traits::move" (yay for regexes):
iterator: return (move(*current));
iterator: return (move(current[_Off]));
xfwrap1: #define _A0_A1_MOV _LIST_CALL(_Arg, _Ax, move)
xfwrap1: #define _F0_F1_MOV _LIST_CALL(_Farg, _Fx, move)
xtr1common:#define _A1_A2_MOV_MAX _CDR2_CALL_MAX(_Arg, _Ax, move)
VC11 has only:
xutility: return (move(*current));
xutility: return (move(current[_Off]));
in move_iterator. (We've already rewritten the fake variadic macros.) I've added _STD qualification (our internal macro for ::std::) to both lines in my current set of pending changes. (Unfortunately, I can't retroactively fix VC10, but at least I can fix the next major version.)
Please let me know if you encounter any other unqualified calls that are causing trouble. My E-mail address is easy to remember. :->
Thanks,
Stephan T. Lavavej
Visual C++ Libraries Developer
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk