On 7/26/2015 11:00 AM, Peter Dimov wrote:
My money is on #include
, because lightweight_test.hpp doesn't do much else involving size_t. Or perhaps it's the #include <iostream> that pulls something in? It's <iostream>. Which is better as now the bug report is self-contained. :-)
Yes. #include <cstddef> #include <iostream> namespace boost { namespace mpl { struct integral_c_tag { static const int value = 0; }; template< std::size_t N > struct size_t { static const std::size_t value = N; typedef size_t type; typedef std::size_t value_type; typedef integral_c_tag tag; typedef boost::mpl::size_t< static_caststd::size_t((value + 1)) > next; typedef boost::mpl::size_t< static_caststd::size_t((value - 1)) > prior; operator std::size_t() const { return static_caststd::size_t(this->value); } }; template< std::size_t N > std::size_t const boost::mpl::size_t< N >::value; }} int main() { return 0; } using namespace boost; using namespace mpl; The above fails, nor does the order of the two #includes affect anything. Removing the using directives at the end and it succeeds. I will report this directly to Microsoft. Maybe STL can get them to address this bug. The code is a much simplified version of the MPL tests using boost::mpl::size_t.