Re: [Boost-users] Unexpected warning relating to boost::function, and size_t / unsigned
Hi Matt, Disable the /Wp64 switch. It is deprecated, as it gave false-positives and false-negatives, for explanation see: http://blogs.msdn.com/vcblog/archive/2007/08/10/the-future-of-the-c-language... Regards, Anders Dalvander
Hello,
I'm receiving a compiler warning (MSVC8.0) that does not make sense to me, and I wonder if this might be a boost related issue:
int main() { std::vector< std::size_t > sizes; std::vector< unsigned > data;
boost::function< bool (unsigned, unsigned) > fn = std::greater< unsigned >(); fn( data.front(), 10 ); // NOTE: data is empty - will cause runtime error }
The warning I get is: warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data referring to the last line in main().
Matt
participants (1)
-
Anders Dalvander