diff --git a/README.md b/README.md
index ba0bc9f0667a33f5666a7642028053b93b90d6ab..3f70aa8183e6b0f953e94138370aea65ad3dc50b 100644
--- a/README.md
+++ b/README.md
@@ -66,12 +66,12 @@ a 32-bit Octave.
 A number of tools and libraries are needed in order to recompile everything. You don't necessarily need to install everything, depending on what you want to compile.
 
 - A POSIX compliant shell and an implementation of Make (mandatory)
-- The [GNU Compiler Collection](http://gcc.gnu.org/), version 6 or later, with
+- The [GNU Compiler Collection](http://gcc.gnu.org/), version 8 or later, with
   gcc, g++ and gfortran (mandatory)
 - MATLAB (if you want to compile the MEX for MATLAB)
 - [GNU Octave](http://www.octave.org), with the development headers (if you
   want to compile the MEX for Octave)
-- [Boost libraries](http://www.boost.org), version 1.36 or later (with the filesystem library compiled)
+- [Boost libraries](http://www.boost.org), version 1.36 or later
 - [Bison](http://www.gnu.org/software/bison/), version 3.2 or later (only if you get the source through Git)
 - [Flex](http://flex.sourceforge.net/), version 2.5.4 or later (only if you get the source through Git)
 - [Autoconf](http://www.gnu.org/software/autoconf/), version 2.62 or later (only if you get the source through Git)
@@ -219,7 +219,7 @@ All the prerequisites are packaged:
 - `build-essential` (for gcc, g++ and make)
 - `gfortran`
 - `liboctave-dev`
-- `libboost-graph-dev` and `libboost-filesystem-dev`
+- `libboost-graph-dev`
 - `libgsl-dev`
 - `libmatio-dev`
 - `libslicot-dev` and `libslicot-pic`
@@ -242,7 +242,7 @@ All the prerequisites are packaged:
 
 You can install them all at once with:
 ```
-apt install build-essential gfortran liboctave-dev libboost-graph-dev libboost-filesystem-dev libgsl-dev libmatio-dev libslicot-dev libslicot-pic libsuitesparse-dev flex bison autoconf automake texlive texlive-publishers texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-generic-extra lmodern python3-sphinx libjs-mathjax doxygen
+apt install build-essential gfortran liboctave-dev libboost-graph-dev libgsl-dev libmatio-dev libslicot-dev libslicot-pic libsuitesparse-dev flex bison autoconf automake texlive texlive-publishers texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-generic-extra lmodern python3-sphinx libjs-mathjax doxygen
 ```
 
 ## Windows
@@ -280,7 +280,7 @@ autoreconf -si
 ```
 - Configure Dynare:
 ```
-./configure --with-boost-system=boost_system-mt --with-boost-filesystem=boost_filesystem-mt --with-slicot=/usr/local --with-matlab=<…> MATLAB_VERSION=<…> --disable-octave
+./configure --with-slicot=/usr/local --with-matlab=<…> MATLAB_VERSION=<…> --disable-octave
 ```
 where the path and version of MATLAB are specified. Note that you should use
 the MSYS2 notation and not put spaces in the MATLAB path, so you probably want
diff --git a/configure.ac b/configure.ac
index 57b18274b21f23bdc4ea5fa30db415c409cf7fa4..fb6da82b97c868ad04cd6d29fc6a69bc470d10c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-dnl Copyright © 2009-2018 Dynare Team
+dnl Copyright © 2009-2019 Dynare Team
 dnl
 dnl This file is part of Dynare.
 dnl
@@ -26,7 +26,7 @@ AC_CONFIG_SUBDIRS([preprocessor])
 
 AC_PROG_CC
 AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX_14
+AX_CXX_COMPILE_STDCXX_17
 
 AC_CANONICAL_HOST
 case ${host_os} in
diff --git a/license.txt b/license.txt
index 97c3e38730ffbc3d96919d3f5e631465acdf2124..c3d89607a927f4d94a1164271bc7e4da1ebf8653 100644
--- a/license.txt
+++ b/license.txt
@@ -243,14 +243,15 @@ License: FSFAP
 
 
 Files: m4/ax_cxx_compile_stdcxx.m4
-       m4/ax_cxx_compile_stdcxx_14.m4
+       m4/ax_cxx_compile_stdcxx_17.m4
 Copyright: 2008 Benjamin Kosnik <bkoz@redhat.com>
            2012 Zack Weinberg <zackw@panix.com>
            2013 Roy Stogner <roystgnr@ices.utexas.edu>
            2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
            2015 Paul Norman <penorman@mac.com>
            2015 Moritz Klammler <moritz@klammler.eu>
-           2016 Krzesimir Nowak <qdlacz@gmail.com>
+           2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
+           2019 Enji Cooper <yaneurabeya@gmail.com>
 License: FSFAP
 
 Files: m4/ax_latex_class.m4 m4/ax_tex_test.m4
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
index 5032bba8091d5d1074f4509b4c47b38a66389c6b..43087b2e6889ec6f8ebd2f8ba77f4a9a716f8ac2 100644
--- a/m4/ax_cxx_compile_stdcxx.m4
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -33,19 +33,19 @@
 #   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
 #   Copyright (c) 2015 Paul Norman <penorman@mac.com>
 #   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
-#   Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
+#   Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
+#   Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-#serial 7
+#serial 11
 
 dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
 dnl  (serial version number 13).
 
-AX_REQUIRE_DEFINED([AC_MSG_WARN])
 AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
   m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
         [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
@@ -61,14 +61,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
         [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
   AC_LANG_PUSH([C++])dnl
   ac_success=no
-  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
-  ax_cv_cxx_compile_cxx$1,
-  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
-    [ax_cv_cxx_compile_cxx$1=yes],
-    [ax_cv_cxx_compile_cxx$1=no])])
-  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
-    ac_success=yes
-  fi
 
   m4_if([$2], [noext], [], [dnl
   if test x$ac_success = xno; then
@@ -139,7 +131,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
               [define if the compiler supports basic C++$1 syntax])
   fi
   AC_SUBST(HAVE_CXX$1)
-  m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
 ])
 
 
@@ -199,11 +190,13 @@ namespace cxx11
 
     struct Base
     {
+      virtual ~Base() {}
       virtual void f() {}
     };
 
     struct Derived : public Base
     {
+      virtual ~Derived() override {}
       virtual void f() override {}
     };
 
@@ -587,20 +580,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus <= 201402L
+#elif __cplusplus < 201703L
 
 #error "This is not a C++17 compiler"
 
 #else
 
-#if defined(__clang__)
-  #define REALLY_CLANG
-#else
-  #if defined(__GNUC__)
-    #define REALLY_GCC
-  #endif
-#endif
-
 #include <initializer_list>
 #include <utility>
 #include <type_traits>
@@ -608,16 +593,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
 namespace cxx17
 {
 
-#if !defined(REALLY_CLANG)
   namespace test_constexpr_lambdas
   {
 
-    // TODO: test it with clang++ from git
-
     constexpr int foo = [](){return 42;}();
 
   }
-#endif // !defined(REALLY_CLANG)
 
   namespace test::nested_namespace::definitions
   {
@@ -852,12 +833,9 @@ namespace cxx17
 
   }
 
-#if !defined(REALLY_CLANG)
   namespace test_template_argument_deduction_for_class_templates
   {
 
-    // TODO: test it with clang++ from git
-
     template <typename T1, typename T2>
     struct pair
     {
@@ -876,7 +854,6 @@ namespace cxx17
     }
 
   }
-#endif // !defined(REALLY_CLANG)
 
   namespace test_non_type_auto_template_parameters
   {
@@ -890,12 +867,9 @@ namespace cxx17
 
   }
 
-#if !defined(REALLY_CLANG)
   namespace test_structured_bindings
   {
 
-    // TODO: test it with clang++ from git
-
     int arr[2] = { 1, 2 };
     std::pair<int, int> pr = { 1, 2 };
 
@@ -927,14 +901,10 @@ namespace cxx17
     const auto [ x3, y3 ] = f3();
 
   }
-#endif // !defined(REALLY_CLANG)
 
-#if !defined(REALLY_CLANG)
   namespace test_exception_spec_type_system
   {
 
-    // TODO: test it with clang++ from git
-
     struct Good {};
     struct Bad {};
 
@@ -952,7 +922,6 @@ namespace cxx17
     static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
 
   }
-#endif // !defined(REALLY_CLANG)
 
   namespace test_inline_variables
   {
@@ -977,6 +946,6 @@ namespace cxx17
 
 }  // namespace cxx17
 
-#endif  // __cplusplus <= 201402L
+#endif  // __cplusplus < 201703L
 
 ]])
diff --git a/m4/ax_cxx_compile_stdcxx_14.m4 b/m4/ax_cxx_compile_stdcxx_17.m4
similarity index 80%
rename from m4/ax_cxx_compile_stdcxx_14.m4
rename to m4/ax_cxx_compile_stdcxx_17.m4
index 094db0d025cbb77b35abb3b017d1dcdef809efb5..a6834171739bed1a8974fe48999a9c91104cab34 100644
--- a/m4/ax_cxx_compile_stdcxx_14.m4
+++ b/m4/ax_cxx_compile_stdcxx_17.m4
@@ -1,19 +1,19 @@
 # =============================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html
+#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html
 # =============================================================================
 #
 # SYNOPSIS
 #
-#   AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional])
+#   AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional])
 #
 # DESCRIPTION
 #
-#   Check for baseline language coverage in the compiler for the C++14
+#   Check for baseline language coverage in the compiler for the C++17
 #   standard; if necessary, add switches to CXX and CXXCPP to enable
 #   support.
 #
 #   This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
-#   macro with the version set to C++14.  The two optional arguments are
+#   macro with the version set to C++17.  The two optional arguments are
 #   forwarded literally as the second and third argument respectively.
 #   Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
 #   more information.  If you want to use this macro, you also need to
@@ -22,13 +22,14 @@
 # LICENSE
 #
 #   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+#   Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 5
+#serial 2
 
 AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])])
diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac
index 2cf2d0f69ec5c3b6a75e44db45dd4109e381e022..cc4c771b1442adf3affa8b6b306073dd85a35bcd 100644
--- a/mex/build/matlab/configure.ac
+++ b/mex/build/matlab/configure.ac
@@ -58,7 +58,7 @@ AC_PROG_F77([gfortran g77 f77])
 AC_PROG_CC
 AC_PROG_CC_C99 # mjdgges DLL now uses C99 features (variable declared in for loop)
 AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX_14
+AX_CXX_COMPILE_STDCXX_17
 AC_PROG_RANLIB
 AX_PROG_LN_S
 AC_PROG_MKDIR_P
diff --git a/mex/build/octave/configure.ac b/mex/build/octave/configure.ac
index fc12ba4e0d45724740d4c76c86c7bc14881bc6f7..6ff86d4d137967d6a3e9715955595df6bdc993f9 100644
--- a/mex/build/octave/configure.ac
+++ b/mex/build/octave/configure.ac
@@ -43,7 +43,7 @@ AC_PROG_F77([gfortran g77 f77])
 AC_PROG_CC
 AC_PROG_CC_C99 # mjdgges DLL now uses C99 features (variable declared in for loop)
 AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX_14
+AX_CXX_COMPILE_STDCXX_17
 AC_PROG_RANLIB
 AX_PROG_LN_S
 AC_PROG_MKDIR_P
diff --git a/preprocessor b/preprocessor
index 7c3f981eacdf7657aab0104cff6a028c93eb9549..0c755460b1cd971a1e138099147cdd7877a95f45 160000
--- a/preprocessor
+++ b/preprocessor
@@ -1 +1 @@
-Subproject commit 7c3f981eacdf7657aab0104cff6a028c93eb9549
+Subproject commit 0c755460b1cd971a1e138099147cdd7877a95f45