Guillaume Munch wrote:

> Le 05/06/2016 12:54, Georg Baum a écrit :
>> Therefore I would vote to support MSVC 2013 and later, but nothing
>> earlier.
> 
> In light of the lack of support of unicode string literals in MSVC 2013,
> the availability of mingw and the fact that a last-minute switch to MSVC
> 2015 was already necessary for the release of lyx 2.2, I vote for
> supporting MSVC >= 2015.

Fine with me as well. I took 2013 because I did not want to diverge too far 
from your proposal;-)

>> Concerning the order of committing, I would first change the
>> --disable-cxx11 switch to --disable-cxx14, so that we do not loose
>> the infrastructure, and remove all code that is inside #ifndef
>> LYX_USE_CXX11. Afterwards, we can gradually introduce more C++11
>> features like unique_ptr. I can do the configure stuff if you like
>> btw.
> 
> Yes, please do this.

It turned out that it was too difficult to retain the stuff for some 
hypothetical future C++14 checks. I will commit the attached unless nobody 
objects. This is simply the unconditional use of C++11. After this patch it 
would be possible to get rid of parts of the included boost already.


Georg
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8425716..104878b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,7 +142,6 @@ LYX_OPTION(ENABLE_EXPORT_TESTS "Enable for export tests" OFF ALL)
 LYX_OPTION(ASAN             "Use address sanitizer" OFF ALL)
 LYX_COMBO(USE_QT            "Use Qt version as frontend" QT4 QT5)
 LYX_OPTION(3RDPARTY_BUILD   "Build 3rdparty libs" OFF ALL)
-LYX_COMBO(ENABLE_CXX11          "Build with options for c++11-mode" AUTO ON OFF)
 
 # GCC specific
 LYX_OPTION(PROFILE              "Build profile version" OFF GCC)
@@ -254,24 +253,10 @@ else()
 endif()
 
 
-if(LYX_ENABLE_CXX11 MATCHES "AUTO")
-  # Set to some meaningful default
-  find_package(CXX11Compiler)
-  if(NOT CXX11COMPILER_FOUND)
-    set(LYX_ENABLE_CXX11 OFF CACHE TYPE STRING FORCE)
-  else()
-    if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-        set(LYX_ENABLE_CXX11 ON CACHE TYPE STRING FORCE)
-    else()
-      # Not a gnu compiler
-      if(CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$")
-        set(LYX_ENABLE_CXX11 ON CACHE TYPE STRING FORCE)
-      else()
-        set(LYX_ENABLE_CXX11 OFF CACHE TYPE STRING FORCE)
-      endif()
-    endif()
-  endif()
+# Set to some meaningful default
+find_package(CXX11Compiler)
+if(NOT CXX11COMPILER_FOUND)
+	message(FATAL_ERROR "A C++11 compatible compiler is required.")
 endif()
 set(LYX_GCC11_MODE)
 if(UNIX OR MINGW)
@@ -285,17 +270,9 @@ if(UNIX OR MINGW)
 		# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
 		set(LYX_USE_STD_REGEX 0)
 	else()
-		if (LYX_ENABLE_CXX11)
-			set(LYX_USE_STD_REGEX 1)
-		endif()
-	endif()
-	if (LYX_ENABLE_CXX11)
-		find_package(CXX11Compiler)
-		if(NOT CXX11COMPILER_FOUND)
-			message(FATAL_ERROR "A C++11 compatible compiler is required.")
-		endif()
-		set(LYX_GCC11_MODE "${CXX11_FLAG}")
+		set(LYX_USE_STD_REGEX 1)
 	endif()
+	set(LYX_GCC11_MODE "${CXX11_FLAG}")
 else()
 	set(LYX_USE_STD_REGEX 0)
 #	if(MSVC10)
diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 9ba8a87..f6eeae3 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -146,30 +146,7 @@ AC_DEFUN([LYX_PROG_CLANG],
 ])
 
 
-dnl Usage: LYX_CXX_CXX11: set lyx_use_cxx11 to yes if the compiler implements
-dnl the C++11 standard.
-AC_DEFUN([LYX_CXX_CXX11],
-[AC_CACHE_CHECK([whether the compiler implements C++11],
-               [lyx_cv_cxx_cxx11],
- [save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
-  save_CXXFLAGS=$CXXFLAGS
-  CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS"
-  AC_LANG_PUSH(C++)
-  AC_TRY_COMPILE([], [
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-	    this is a c++11 compiler
-#endif
-  ],
-  [lyx_cv_cxx_cxx11=no], [lyx_cv_cxx_cxx11=yes ; lyx_flags="$lyx_flags c++11"])
- AC_LANG_POP(C++)
- CXXFLAGS=$save_CXXFLAGS
- CPPFLAGS=$save_CPPFLAGS])
- lyx_use_cxx11=$lyx_cv_cxx_cxx11
-])
-
-
-dnl Usage: LYX_CXX_USE_REGEX(cxx11_flags)
+dnl Usage: LYX_CXX_USE_REGEX(cxxstd_flags)
 dnl decide whether we want to use std::regex and set the
 dnl LYX_USE_STD_REGEX accordingly.
 dnl the extra cxx11 flags have to be passed to the preprocessor. They are
@@ -177,7 +154,6 @@ dnl not plainly added to AM_CPPFLAGS because then the objc compiler (mac)
 dnl would fail.
 AC_DEFUN([LYX_CXX_USE_REGEX],
 [lyx_std_regex=no
- if test $lyx_use_cxx11 = yes; then
    save_CPPFLAGS=$CPPFLAGS
    # we want to pass -std=c++11 to clang/cpp if necessary
    CPPFLAGS="$AM_CPPFLAGS $1 $CPPFLAGS"
@@ -200,7 +176,6 @@ AC_DEFUN([LYX_CXX_USE_REGEX],
      fi
    fi
    AC_MSG_RESULT([$lyx_std_regex])
- fi
 
  if test $lyx_std_regex = yes ; then
   lyx_flags="$lyx_flags std-regex"
@@ -298,10 +273,6 @@ case $enable_optimization in
     *) lyx_optim=${enable_optimization};;
 esac
 
-AC_ARG_ENABLE(cxx11,
-  AC_HELP_STRING([--disable-cxx11],[disable C++11 mode (default: enabled for known good compilers)]),,
-  enable_cxx11=auto;)
-
 AC_ARG_ENABLE(assertions,
   AC_HELP_STRING([--enable-assertions],[add runtime sanity checks in the program]),,
   [AS_CASE([$build_type], [dev*|pre*], [enable_assertions=yes],
@@ -358,38 +329,29 @@ if test x$GXX = xyes; then
         ;;
     esac
   fi
-  dnl enable_cxx11 can be yes/no/auto.
-  dnl By default, it is auto and we enable C++11 when possible
-  if test x$enable_cxx11 != xno ; then
     case $gxx_version in
       4.3*|4.4*|4.5*|4.6*)
         dnl Note that this will define __GXX_EXPERIMENTAL_CXX0X__.
-        dnl The source code relies on that.
-        cxx11_flags="-std=c++0x";;
+        dnl parts of boost rely on that.
+        cxxstd_flags="-std=c++0x";;
       clang)
         dnl presumably all clang versions support c++11.
 	dnl the deprecated-register warning is very annoying with Qt4.x right now.
-        cxx11_flags="-std=c++11"
+        cxxstd_flags="-std=c++11"
         AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-register";;
       *)
         AS_CASE([$host], [*cygwin*],
-                [cxx11_flags="-std=gnu++11"],
-                [cxx11_flags="-std=c++11"]);;
+                [cxxstd_flags="-std=gnu++11"],
+                [cxxstd_flags="-std=c++11"]);;
     esac
-    # cxx11_flags is useful when running preprocessor alone 
+    # cxxstd_flags is useful when running preprocessor alone 
     # (see detection of regex).
-    AM_CXXFLAGS="$cxx11_flags $AM_CXXFLAGS"
-  fi
-fi
+    AM_CXXFLAGS="$cxxstd_flags $AM_CXXFLAGS"
 
-LYX_CXX_CXX11
-if test $lyx_use_cxx11 = yes; then
-  if test x$GXX = xyes; then
     dnl We still use auto_ptr, which is obsoleted. Shut off the warnings.
     AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-declarations"
-  fi
 fi
-LYX_CXX_USE_REGEX([$cxx11_flags])
+LYX_CXX_USE_REGEX([$cxxstd_flags])
 ])
 
 dnl Usage: LYX_USE_INCLUDED_BOOST : select if the included boost should
diff --git a/configure.ac b/configure.ac
index 8438b14..5d6fe77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -294,10 +294,6 @@ AH_BOTTOM([
 /************************************************************
  ** You should not need to change anything beyond this point */
 
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-#define LYX_USE_CXX11
-#endif
-
 #ifndef HAVE_STRERROR
 #if defined(__cplusplus)
 extern "C"
diff --git a/development/cmake/build4-2010.bat b/development/cmake/build4-2010.bat
index ac1baa8..e8d1445 100644
--- a/development/cmake/build4-2010.bat
+++ b/development/cmake/build4-2010.bat
@@ -82,14 +82,14 @@ if [%2]==[] (
 if "%1%" == "devel" (
 	REM Build solution to develop LyX
 	REM you can add the option "-GNinja" for a faster compilation
-	cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_ENABLE_CXX11=ON -DLYX_ENABLE_EXPORT_TESTS=ON -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_ENABLE_EXPORT_TESTS=ON -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE %DEPENDENCIES_DOWNLOAD%
 	msbuild lyx.sln /p:Configuration=Debug /t:LyX /t:tex2lyx
 )
 
 if "%1%" == "install" (
 	REM Build solution to develop LyX
 	REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
-	cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_ENABLE_CXX11=ON -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
 	msbuild lyx.sln         /p:Configuration=Release /t:ALL_BUILD
 	msbuild INSTALL.vcxproj /p:Configuration=Release
 )
diff --git a/development/cmake/build5-2015-x64.bat b/development/cmake/build5-2015-x64.bat
index 43603c4..513fc05 100644
--- a/development/cmake/build5-2015-x64.bat
+++ b/development/cmake/build5-2015-x64.bat
@@ -73,7 +73,7 @@ REM start with a new cmake run
 if "%1%" == "devel" (
 	REM Build solution to develop LyX
 	REM you can add the option "-GNinja" for a faster compilation
-	cmake %LYX_SOURCE% -G"Visual Studio 14 2015 Win64" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -G"Visual Studio 14 2015 Win64" -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
 	msbuild src\LyX.vcxproj /p:Configuration=Debug
 	msbuild src\tex2lyx\tex2lyx.vcxproj /p:Configuration=Debug
 )
@@ -81,7 +81,7 @@ if "%1%" == "devel" (
 if "%1%" == "install" (
 	REM Build solution to develop LyX
 	REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
-	cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14 2015 Win64" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14 2015 Win64" -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
 	msbuild INSTALL.vcxproj /p:Configuration=Release
 )
 
diff --git a/development/cmake/build5-2015.bat b/development/cmake/build5-2015.bat
index e2238a5..bbacf84 100644
--- a/development/cmake/build5-2015.bat
+++ b/development/cmake/build5-2015.bat
@@ -76,7 +76,7 @@ REM start with a new cmake run
 if "%1%" == "devel" (
 	REM Build solution to develop LyX
 	REM you can add the option "-GNinja" for a faster compilation
-	cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -G"Visual Studio 14 2015" -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD%
 	msbuild src\LyX.vcxproj /p:Configuration=Debug
 	msbuild src\tex2lyx\tex2lyx.vcxproj /p:Configuration=Debug
 )
@@ -84,7 +84,7 @@ if "%1%" == "devel" (
 if "%1%" == "install" (
 	REM Build solution to develop LyX
 	REM set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version released with an installer
-	cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14 2015" -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
+	cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14 2015" -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF %DEPENDENCIES_DOWNLOAD%
 	REM msbuild lyx.sln         /p:Configuration=Release /t:ALL_BUILD
 	msbuild INSTALL.vcxproj /p:Configuration=Release
 )
diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
index 26aa35f..a032545 100644
--- a/development/cmake/config.h.cmake
+++ b/development/cmake/config.h.cmake
@@ -68,13 +68,6 @@
 // use GNU libstdc++ with C++11 ABI
 #cmakedefine USE_GLIBCXX_CXX11_ABI 1
 
-// use GNU c++11 extensions
-#cmakedefine LYX_USE_CXX11 1
-#ifndef LYX_USE_CXX11
-  #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
-    #error "Conflicting defines of LYX_USE_CXX11"
-  #endif
-#endif
 #cmakedefine Z_PREFIX 1
 
 // Defined if QT=QT5 uses X11
diff --git a/development/cmake/mingw.bat b/development/cmake/mingw.bat
index e9041b9..d25db89 100644
--- a/development/cmake/mingw.bat
+++ b/development/cmake/mingw.bat
@@ -23,7 +23,7 @@ rmdir /s/q %LYX_BUILD%
 mkdir %LYX_BUILD%
 
 cd %LYX_BUILD%
-cmake %LYX_SOURCE% -G"MinGW Makefiles" -DLYX_PYTHON_EXECUTABLE=%GNUWIN32_DIR%\Python\python -DLYX_3RDPARTY_BUILD=1 -DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=1 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF 
+cmake %LYX_SOURCE% -G"MinGW Makefiles" -DLYX_PYTHON_EXECUTABLE=%GNUWIN32_DIR%\Python\python -DLYX_3RDPARTY_BUILD=1 -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=1 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF 
 
 mingw32-make doc
 mingw32-make translations
diff --git a/development/cmake/scripts/xmingw b/development/cmake/scripts/xmingw
index b1a859a..868d96b 100755
--- a/development/cmake/scripts/xmingw
+++ b/development/cmake/scripts/xmingw
@@ -106,7 +106,6 @@ cmake $lyxsrcdir \
     -DLYX_XMINGW=$compiler \
     -DLYX_USE_QT=QT5 \
     -DLYX_QUIET=1 \
-    -DLYX_ENABLE_CXX11=ON \
     -DLYX_HUNSPELL=1 \
     -DLYX_3RDPARTY_BUILD=1 \
     $pch $mergefile
diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp
index 44118c7..63b6bc6 100644
--- a/src/frontends/qt4/GuiCitation.cpp
+++ b/src/frontends/qt4/GuiCitation.cpp
@@ -690,7 +690,7 @@ static docstring escape_special_chars(docstring const & expr)
 
 	// $& is an ECMAScript format expression that expands to all
 	// of the current match
-#if defined(LYX_USE_CXX11) && defined(LYX_USE_STD_REGEX)
+#ifdef LYX_USE_STD_REGEX
 	// To prefix a matched expression with a single literal backslash, we
 	// need to escape it for the C++ compiler and use:
 	// FIXME: UNICODE
diff --git a/src/frontends/tests/biblio.cpp b/src/frontends/tests/biblio.cpp
index 4ba1d40..067cc9b 100644
--- a/src/frontends/tests/biblio.cpp
+++ b/src/frontends/tests/biblio.cpp
@@ -20,7 +20,7 @@ string const escape_special_chars(string const & expr)
 
 	// $& is a ECMAScript format expression that expands to all
 	// of the current match
-#if defined(LYX_USE_CXX11) && defined(LYX_USE_STD_REGEX)
+#ifdef LYX_USE_STD_REGEX
 	// To prefix a matched expression with a single literal backslash, we
 	// need to escape it for the C++ compiler and use:
 	return lyx::regex_replace(expr, reg, "\\$&");
diff --git a/src/support/bind.h b/src/support/bind.h
index 1449c43..5a734ff 100644
--- a/src/support/bind.h
+++ b/src/support/bind.h
@@ -14,30 +14,13 @@
 
 #include "support/functional.h"
 
-#ifdef LYX_USE_CXX11
-
-#define LYX_BIND_NS std
-
 namespace lyx
 {
 	using std::placeholders::_1;
 	using std::placeholders::_2;
+	using std::bind;
+	using std::ref;
 }
 
-#else
-
-#include <boost/bind.hpp>
-#define LYX_BIND_NS boost
-
-#endif
-
-namespace lyx
-{
-	using LYX_BIND_NS::bind;
-	using LYX_BIND_NS::ref;
-}
-
-#undef LYX_BIND_NS
-
 
 #endif
diff --git a/src/support/functional.h b/src/support/functional.h
index 5d373d1..6673ded 100644
--- a/src/support/functional.h
+++ b/src/support/functional.h
@@ -12,25 +12,12 @@
 #ifndef LYX_FUNCTIONAL_H
 #define LYX_FUNCTIONAL_H
 
-#ifdef LYX_USE_CXX11
-
 #include <functional>
-#define LYX_FUNCTIONAL_NS std
-
-#else
-
-#include <boost/function.hpp>
-#include <boost/functional.hpp>
-#define LYX_FUNCTIONAL_NS boost
-
-#endif
 
 namespace lyx
 {
-	using LYX_FUNCTIONAL_NS::function;
+	using std::function;
 }
 
-#undef LYX_FUNCTIONAL_NS
-
 
 #endif
diff --git a/src/support/lyxalgo.h b/src/support/lyxalgo.h
index 9e44838..d1aa023 100644
--- a/src/support/lyxalgo.h
+++ b/src/support/lyxalgo.h
@@ -84,30 +84,10 @@ void eliminate_duplicates(C & c)
 }
 
 
-#ifdef LYX_USE_CXX11
 using std::next;
-#else
-/// Replacement of std::next for older compilers
-template <typename It, typename Diff>
-inline It next(It i, Diff n = 1)
-{
-	std::advance(i, n);
-	return i;
-}
-#endif
 
 
-#ifdef LYX_USE_CXX11
 using std::prev;
-#else
-/// Replacement of std::prev for older compilers
-template <typename It, typename Diff>
-inline It prev(It i, Diff n = 1)
-{
-	std::advance(i, -n);
-	return i;
-}
-#endif
 
 } // namespace lyx
 
diff --git a/src/support/regex.h b/src/support/regex.h
index fd6f1e5..d99242a 100644
--- a/src/support/regex.h
+++ b/src/support/regex.h
@@ -12,7 +12,7 @@
 #ifndef LYX_REGEXP_H
 #define LYX_REGEXP_H
 
-#if defined(LYX_USE_CXX11) && defined(LYX_USE_STD_REGEX)
+#ifdef LYX_USE_STD_REGEX
 #  include <regex>
 // <regex> in gcc is unusable in versions less than 4.9.0
 // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
diff --git a/src/support/shared_ptr.h b/src/support/shared_ptr.h
index bb613de..ef9e1ad 100644
--- a/src/support/shared_ptr.h
+++ b/src/support/shared_ptr.h
@@ -12,27 +12,14 @@
 #ifndef LYX_SHARED_PTR_H
 #define LYX_SHARED_PTR_H
 
-#ifdef LYX_USE_CXX11
-
 #include <memory>
-#define LYX_SHAREDPTR_NS std
-
-#else
-
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-#define LYX_SHAREDPTR_NS boost
-
-#endif
 
 namespace lyx
 {
-	using LYX_SHAREDPTR_NS::shared_ptr;
-	using LYX_SHAREDPTR_NS::make_shared;
-	using LYX_SHAREDPTR_NS::const_pointer_cast;
+	using std::shared_ptr;
+	using std::make_shared;
+	using std::const_pointer_cast;
 }
 
-#undef LYX_SHAREDPTR_NS
-
 
 #endif
diff --git a/src/tex2lyx/Parser.h b/src/tex2lyx/Parser.h
index 489b132..19f0c5f 100644
--- a/src/tex2lyx/Parser.h
+++ b/src/tex2lyx/Parser.h
@@ -125,15 +125,9 @@ public:
 
 	iparserdocstream(idocstream & is) : is_(is) {}
 
-#ifdef LYX_USE_CXX11
 	/// Like std::istream::operator bool()
 	/// Do not convert is_ implicitly to bool, since that is forbidden in C++11.
 	explicit operator bool() const { return s_.empty() ? !is_.fail() : true; }
-#else
-	/// Like std::istream::operator void*()
-	operator void*() const { return (s_.empty() && is_.fail()) ?
-			0 : const_cast<iparserdocstream *>(this); }
-#endif
 
 	/// change the encoding of the input stream to \p e (iconv name)
 	void setEncoding(std::string const & e);

Reply via email to