Subject: Re: [boost] [config] msvc-14 config changes heads up
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-07-07 22:24:12
On 7/07/2016 08:50, Niall Douglas wrote:
> For anyone who has used MSVC for any length of time, we automatically
> write our code to ensure all overloads precede usage in order to
> ensure correct outcomes, sufficiently so many coming originally from
> MSVC-land are not aware MSVC is deficient on this. The fact so little
> Boost code requires two phase lookup was quite a surprise to me, but
> there you have it.
Well, it's natural C-ish coding style to at least declare symbols
(including all overloads) before they're used, so most coding patterns
wouldn't run into the difference.
Where you're more likely to run into problems is if the library defines
something that the user then further overloads -- but due to namespaces
this would generally indicate a poor design if symbols have mixed
implementations between library and user code. So library code is
probably the least vulnerable to it.
One of the common resolutions for cases where this sort of thing is
needed is to use template specialisation (eg. a traits template such as
std::hash) -- and using such a template with the parameter type T will
*always* be a dependent type, so shouldn't have this issue anyway.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk