]> git.saurik.com Git - bison.git/commitdiff
* m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Feb 2006 23:53:07 +0000 (23:53 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Feb 2006 23:53:07 +0000 (23:53 +0000)
'#include <map>' works and that you can apply ++ to iterators.

ChangeLog
m4/cxx.m4

index f47e6844abc8e10b952a617b7a406ae6c6448b13..ebbbba625f09774140b2d94b103357b6da508a41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       More portability fixes for problems summarized by Nelson H. F. Beebe.
+
+       * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
+       '#include <map>' works and that you can apply ++ to iterators.
+
 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        Work around portability problems summarized by Nelson H. F. Beebe in
index a8eff8ee04fd016efff68af6481b5ef51c3f9a91..a63593f2077484deb809b59d5d37def5d27b40d3 100644 (file)
--- 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])