Skip to content

Commit

Permalink
removed c++17 compilation for visual studio (compiler bug)
Browse files Browse the repository at this point in the history
error C2752: 'template_type_trait<std::array<bool, 100>>': more than one partial specialization matches the template argument list
note: could be 'template_type_trait<T<N>>'
note: or       'template_type_trait<T<N>>'

Reported to MS
  • Loading branch information
acki-m committed Feb 1, 2018
1 parent b8dc30f commit 5843fa8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ enable_rtti(BUILD_WITH_RTTI)
get_latest_supported_cxx(CXX_STANDARD)
set(MAX_CXX_STANDARD ${CXX_STANDARD})

if(MSVC)
if (${CXX_STANDARD} EQUAL 17 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.12.25835.0")
set(MAX_CXX_STANDARD 14) # downgrade, because RTTR does not compile with this flag (template error)
endif()
endif()

message(STATUS "using C++: ${MAX_CXX_STANDARD}")

# RelWithDepInfo should have the same option like the Release build
Expand Down

0 comments on commit 5843fa8

Please sign in to comment.