* m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that

'#include <map>' works and that you can apply ++ to iterators.
This commit is contained in:
Paul Eggert
2006-02-02 23:53:07 +00:00
parent 8c86f0ef98
commit d9735e9e3e
2 changed files with 16 additions and 1 deletions

View File

@@ -29,10 +29,18 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COMPILER],
[AC_LANG_PROGRAM(
[#include <cstdlib>
#include <iostream>
#include <map>
#include <string>
using namespace std;],
[std::cerr << "";
cout << "";])],
cout << "";
typedef std::pair<unsigned int, int> uipair;
std::map<unsigned int, int> m;
std::map<unsigned int, int>::iterator i;
m.insert (uipair (4, -4));
for (i = m.begin (); i != m.end (); ++i)
if (i->first != 4)
return 1;])],
[bison_cv_cxx_works=yes],
[bison_cv_cxx_works=no],
[bison_cv_cxx_works=cross])