This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Why does this fail to compile in C++11 mode?
- From: Kenny Simpson <theonetruekenny at yahoo dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 9 Jun 2013 21:50:51 -0700 (PDT)
- Subject: Re: Why does this fail to compile in C++11 mode?
... 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