[Libpqxx-general] Building the cvs version with Visual Studio 9 - fix for pipeline.cxx

Jeroen Vermeulen jtv at xs4all.nl
Fri Jun 13 13:25:04 UTC 2008


Andrew Maclean wrote:
> I am building with VS 9 and postgresql 8.8.3. You need a minor fix to
> the file pipeline.cxx
> 
> The build works provided that in the file pipeline.cxx you replace
> distance in lines 206 and 315 with std::distance. This function is no
> longer in the anonymous namespace.

It's not supposed to be in the anonymous namespace, except as a 
workaround for std not having one.  So it sounds more likely that you 
ran into a conflict, where two conflicting versions of distance() were 
available.  I think the appropriate way to fix the problem is to make 
the headers note that this particular compiler has std::distance().

To verify, does the problem go away when you #define PQXX_HAVE_DISTANCE?


Jeroen



More information about the Libpqxx-general mailing list