浏览代码

Compile with C++17 minimum requirement

Michael Ragazzon 6 月之前
父节点
当前提交
b08dd5c384
共有 3 个文件被更改,包括 2 次插入11 次删除
  1. 1 1
      CMake/Utilities.cmake
  2. 0 9
      Source/Core/ElementStyle.cpp
  3. 1 1
      readme.md

+ 1 - 1
CMake/Utilities.cmake

@@ -98,7 +98,7 @@ endfunction()
 		- target: The name of the target to set
 ]]
 function(set_common_target_options target)
-	target_compile_features(${target} PUBLIC cxx_std_14)
+	target_compile_features(${target} PUBLIC cxx_std_17)
 	set_target_properties(${target} PROPERTIES C_EXTENSIONS OFF CXX_EXTENSIONS OFF)
 
 	if(RMLUI_COMPILER_OPTIONS)

+ 0 - 9
Source/Core/ElementStyle.cpp

@@ -473,15 +473,6 @@ bool ElementStyle::AnyPropertiesDirty() const
 
 PropertiesIterator ElementStyle::Iterate() const
 {
-	// Note: Value initialized iterators are only guaranteed to compare equal in C++14, and only for iterators
-	// satisfying the ForwardIterator requirements.
-#ifdef _MSC_VER
-	// Null forward iterator supported since VS 2015
-	static_assert(_MSC_VER >= 1900, "Visual Studio 2015 or higher required, see comment.");
-#else
-	static_assert(__cplusplus >= 201402L, "C++14 or higher required, see comment.");
-#endif
-
 	const PropertyMap& property_map = inline_properties.GetProperties();
 	auto it_style_begin = property_map.begin();
 	auto it_style_end = property_map.end();

+ 1 - 1
readme.md

@@ -79,7 +79,7 @@ RmlUi adds features and enhancements over CSS and HTML where it makes sense, mos
 - [FreeType](https://www.freetype.org/). However, it can be fully replaced by a custom [font engine](https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/interfaces/font_engine.html).
 - The standard library.
 
-In addition, a C++14 compatible compiler is required.
+In addition, a C++17 compatible compiler is required.
 
 
 ## Building RmlUi