summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-02-02 23:53:07 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-02-02 23:53:07 +0000
commitd9735e9e3e09c94b05e5b81e86cce6c7f7cf72af (patch)
tree513138e24b4d3f5cf0847a7025433659d7c0ecdb /m4
parent8c86f0ef98ffa6b7a54e55aa54e44afed464a94e (diff)
downloadbison-d9735e9e3e09c94b05e5b81e86cce6c7f7cf72af.tar.gz
* m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
'#include <map>' works and that you can apply ++ to iterators.
Diffstat (limited to 'm4')
-rw-r--r--m4/cxx.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/cxx.m4 b/m4/cxx.m4
index a8eff8ee..a63593f2 100644
--- a/m4/cxx.m4
+++ b/m4/cxx.m4
@@ -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])