[vtk-developers] Request for a gentler tone in commit message verbiage...

Robert Maynard robert.maynard at kitware.com
Thu Apr 30 08:52:16 EDT 2015


<SNIP>

>
> I'm still missing something here. One on of my attempts to get this to
> compile simultaneously across all of our windows dashboards, this call was
> failing:
>
> std::pair<double, X*>(someDouble, NULL);
>
> As I understand it, if NULL is defined as either (int)0, (void*)0, or
> nullptr (depending on implementation/standard), all of those expressions are
> implicitly convertible to X* without going through an intermediate, right?
> To fix it, I had to explicitly cast the NULL to X* for compilation to
> succeed. What am I missing here?

Sorry I was unclear, I was mainly referring to the usage of make_pair
with explicit template parameters. As far as I am aware MSVC 2010 has
an issue with pair where it doesn't respect all the different null
pointer conversion types ( int(), 0, nullptr, std::nullptr_t(), etc)
but only would convert nullptr and std::nullptr_t. This issue of
pointer conversion was fixed in MSVC 2012, but the rules about
make_pair exist for all versions of MSVC from 2010 and forward.


More information about the vtk-developers mailing list