Mercurial > jwe > octave
changeset 22150:c4901d7a2d7d
Remove check for std::tr1::unordered_map because we depend on C++11.
* rand.cc: remove conditional include of unordered_map from std::tr1
if it's missing from std. Octave is already dependent on C++11 so it
is no longer needed.
* configure.ac: remove call to OCTAVE_UNORDERED_MAP_HEADERS.
* m4/acinclude.m4: remove unused OCTAVE_UNORDERED_MAP_HEADERS macro.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Wed, 20 Jul 2016 15:32:53 +0100 |
parents | ba8a9d2934c7 |
children | 283d8dfcad37 |
files | configure.ac libinterp/corefcn/rand.cc m4/acinclude.m4 |
diffstat | 3 files changed, 2 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Mon Jul 18 13:52:57 2016 +0200 +++ b/configure.ac Wed Jul 20 15:32:53 2016 +0100 @@ -2379,7 +2379,6 @@ AC_LANG_PUSH(C++) AC_CHECK_HEADERS([sstream]) -OCTAVE_UNORDERED_MAP_HEADERS AC_LANG_POP(C++)
--- a/libinterp/corefcn/rand.cc Mon Jul 18 13:52:57 2016 +0200 +++ b/libinterp/corefcn/rand.cc Wed Jul 20 15:32:53 2016 +0100 @@ -27,11 +27,7 @@ #endif #include <ctime> -#if defined (HAVE_UNORDERED_MAP) -# include <unordered_map> -#elif defined (HAVE_TR1_UNORDERED_MAP) -# include <tr1/unordered_map> -#endif +#include <unordered_map> #include <string> #include "f77-fcn.h" @@ -1078,12 +1074,6 @@ @seealso{perms} @end deftypefn */) { -#if defined (USE_UNORDERED_MAP_WITH_TR1) -using std::tr1::unordered_map; -#else -using std::unordered_map; -#endif - int nargin = args.length (); if (nargin < 1 || nargin > 2) @@ -1128,7 +1118,7 @@ if (short_shuffle) { - unordered_map<octave_idx_type, octave_idx_type> map (m); + std::unordered_map<octave_idx_type, octave_idx_type> map (m); // Perform the Knuth shuffle only keeping track of moved // entries in the map
--- a/m4/acinclude.m4 Mon Jul 18 13:52:57 2016 +0200 +++ b/m4/acinclude.m4 Wed Jul 20 15:32:53 2016 +0100 @@ -2431,38 +2431,6 @@ [Define to 1 if the UMFPACK Complex solver allows matrix and RHS to be split independently.]) fi ]) -dnl -dnl Check for unordered map headers and whether tr1 namespace is -dnl required. -dnl -AC_DEFUN([OCTAVE_UNORDERED_MAP_HEADERS], [ - AC_CHECK_HEADERS([unordered_map], [], - [AC_CHECK_HEADERS([tr1/unordered_map])]) - AC_CACHE_CHECK([whether unordered_map requires tr1 namespace], - [octave_cv_header_require_tr1_namespace], - [AC_LANG_PUSH(C++) - octave_cv_header_require_tr1_namespace=no - if test $ac_cv_header_unordered_map = yes; then - ## Have <unordered_map>, but still have to check whether - ## tr1 namespace is required (like MSVC, for instance). - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #include <unordered_map> - ]], [[ - std::unordered_map<int,int> m; - ]])], - octave_cv_header_require_tr1_namespace=no, - octave_cv_header_require_tr1_namespace=yes) - elif test $ac_cv_header_tr1_unordered_map = yes; then - octave_cv_header_require_tr1_namespace=yes - fi - AC_LANG_POP(C++) - ]) - if test $octave_cv_header_require_tr1_namespace = yes; then - AC_DEFINE(USE_UNORDERED_MAP_WITH_TR1, 1, - [Define to 1 if unordered_map requires the use of tr1 namespace.]) - fi -]) dnl End of macros written by Octave developers dnl ------------------------------------------------------------