mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
[CMake] Use C++17
This commit is contained in:
parent
76bac80dde
commit
5afd12e8a4
3 changed files with 3 additions and 20 deletions
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1)
|
|||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
|
||||
set(RES_FILES "")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# Qt section
|
||||
|
|
|
@ -6,14 +6,7 @@
|
|||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <bitset>
|
||||
|
||||
// TODO: replace the code below by #include <optional> when C++17 or newer will be used
|
||||
#include <optional.hpp>
|
||||
namespace std
|
||||
{
|
||||
template<class T>
|
||||
using optional = experimental::optional<T>;
|
||||
}
|
||||
#include <optional>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
@ -45,13 +45,3 @@ namespace std { inline namespace literals { inline namespace chrono_literals {}}
|
|||
#include <algorithm>
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
// Remove once we move to C++17
|
||||
namespace std
|
||||
{
|
||||
template<typename T>
|
||||
constexpr const T clamp(const T value, const T min, const T max)
|
||||
{
|
||||
return value < min ? min : value > max ? max : value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue