diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -55,8 +55,8 @@ lt_cv_deplibs_check_method="pass_all" ;; esac -dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault]) +dnl Require C++14 compiler (no GNU extensions) +AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory], [nodefault]) dnl Check if -latomic is required for CHECK_ATOMIC diff --git a/doc/build-osx.md b/doc/build-osx.md --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -32,6 +32,8 @@ Build Bitcoin ABC ----------------- +Before you start building, please make sure that your compiler supports C++14. + 1. Clone the Bitcoin ABC source code and cd into `bitcoin-abc` git clone https://github.com/Bitcoin-ABC/bitcoin-abc.git diff --git a/doc/build-unix.md b/doc/build-unix.md --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -17,6 +17,8 @@ To Build --------------------- +Before you start building, please make sure that your compiler supports C++14. + It is recommended to create a build directory to build out-of-tree. ```bash diff --git a/doc/build-windows.md b/doc/build-windows.md --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -15,6 +15,8 @@ * On Windows using a POSIX compatibility layer application such as [cygwin](http://www.cygwin.com/) or [msys2](http://www.msys2.org/). * On Windows using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com). +In any case please make sure that the compiler supports C++14. + Installing Windows Subsystem for Linux --------------------------------------- diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -6,3 +6,4 @@ - Added to `getblockchaininfo` `size_on_disk` and, when the prune option is enabled, `prune_height`, `automatic_pruning`, and `prune_target_size`. - The help message also reflects this. + - Code standard updated to c++14. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) project(BitcoinABC) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) # Default visibility is hidden on all targets. set(CMAKE_C_VISIBILITY_PRESET hidden)