From 27b28734f1b33c533611361a1c308a045581167a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz>
Date: Mon, 24 Dec 2018 20:49:44 +0100
Subject: [PATCH] Switch to C++14

---
 CMakeLists.txt | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 208b4789ae..07fc0aa77c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,8 +62,8 @@ endif()
 
 # check if the compiler is good enough
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-   # GCC 5.0 is the first release with full C++11 support (due to libstdc++)
-   # https://gcc.gnu.org/gcc-5/changes.html
+   # GCC 5.0 is the first release with full C++11 support (due to libstdc++) as
+   # well as full C++14 support: https://gcc.gnu.org/gcc-5/changes.html
    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
       message(FATAL_ERROR "Insufficient GCC version")
    endif()
@@ -74,8 +74,13 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    endif()
 endif()
 
+# set C++ standard
+set( CMAKE_CXX_STANDARD 14 )
+set( CMAKE_CXX_STANDARD_REQUIRED ON )
+set( CMAKE_CXX_EXTENSIONS OFF )
+
 # set Debug/Release options
-set( CMAKE_CXX_FLAGS "-std=c++11 -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
+set( CMAKE_CXX_FLAGS "-pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
 set( CMAKE_CXX_FLAGS_DEBUG "-g" )
 set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" )
 #set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" )
-- 
GitLab