mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
Switch to C++20
This commit is contained in:
parent
ad7de1e775
commit
b74c92ee4a
3 changed files with 4 additions and 6 deletions
4
.github/workflows/linux.bash
vendored
4
.github/workflows/linux.bash
vendored
|
|
@ -7,9 +7,7 @@ export CTEST_OUTPUT_ON_FAILURE=1
|
|||
CMAKE_OPTS=()
|
||||
# -Wstringop-overflow is notorious for false positives and has been a problem for years.
|
||||
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
|
||||
# -Wtemplate-id-cdtor leaks from using the generated headers. We should reenable this once
|
||||
# we're considering moving to C++20 and/or the -ti.hpp files are generated differently.
|
||||
WARN_FLAGS="-Wall -Wextra -Wno-template-id-cdtor -Wno-stringop-overflow"
|
||||
WARN_FLAGS="-Wall -Wextra -Wno-stringop-overflow"
|
||||
|
||||
case "$DISTRO" in
|
||||
alpine:*)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
cmake_minimum_required(VERSION 3.17...3.17)
|
||||
set(BOOST_MIN_VERSION "1.66.0")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
|
|||
|
||||
/* constructor */
|
||||
m_Header << "public:" << std::endl
|
||||
<< "\t" << "ObjectImpl<" << klass.Name << ">();" << std::endl;
|
||||
<< "\t" << "ObjectImpl();" << std::endl;
|
||||
|
||||
m_Impl << "ObjectImpl<" << klass.Name << ">::ObjectImpl()" << std::endl
|
||||
<< "{" << std::endl;
|
||||
|
|
@ -577,7 +577,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
|
|||
|
||||
/* destructor */
|
||||
m_Header << "public:" << std::endl
|
||||
<< "\t" << "~ObjectImpl<" << klass.Name << ">() override;" << std::endl;
|
||||
<< "\t" << "~ObjectImpl() override;" << std::endl;
|
||||
|
||||
m_Impl << "ObjectImpl<" << klass.Name << ">::~ObjectImpl()" << std::endl
|
||||
<< "{ }" << std::endl << std::endl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue