Why does this fail to compile in C++11 mode?

Kenny Simpson theonetruekenny@yahoo.com
Mon Jun 10 04:50:00 GMT 2013


... digging a little more, in c++11 mode, stl_algo.h pulls in <random>, and <random> pulls in much of a C headers and a few c++ ones.

stl_algo.h :
#if __cplusplus >= 201103L
#include <random>     // for std::uniform_int_distribution
#include <functional> // for std::bind
#endif

Switching the sample code to also include <cstdio>, it fails the same way in c++98 mode.  (same results for gcc 4.7 and 4.9)

-Kenny



More information about the Libstdc++ mailing list