From 7ef44c6864cc77abb529e11f83e01ae7dc7d5061 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heiko.becker@kde.org>
Date: Thu, 23 May 2024 22:11:28 +0200
Subject: [PATCH] Require C++20 to fix the build with poppler>=24.05

poppler >= 24.05.0 started to use std::string's starts_with and
ends_with [1] in a public header, but these are only available with
C++20.

[1] https://gitlab.freedesktop.org/poppler/poppler/-/commit/fbb64544e5ea25ac9b1bd25b48043d074efe9cd9
---
 CMakeLists.txt     | 2 +-
 libs/pigment/lut.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Origin: backport, https://github.com/KDE/calligra/commit/7ef44c6864cc77abb529e11f83e01ae7dc7d5061
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/calligra/+bug/2070399
Last-Update: 2024-06-25

#--- a/CMakeLists.txt
#+++ b/CMakeLists.txt
#@@ -149,7 +149,7 @@
# set(REQUIRED_KF5_VERSION "5.7.0")
# set(REQUIRED_QT_VERSION "5.3.0")
# 
#-set(CMAKE_CXX_STANDARD 17)
#+set(CMAKE_CXX_STANDARD 20)
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_CXX_EXTENSIONS OFF)
 
--- a/libs/pigment/lut.h
+++ b/libs/pigment/lut.h
@@ -143,7 +143,7 @@
   template<>                                                                      \
   class LutKey<_INT_TYPE_> {                                               \
     public:                                                                       \
-      LutKey<_INT_TYPE_>(_INT_TYPE_ min, _INT_TYPE_ max) : m_min(min), m_max(max) \
+      LutKey(_INT_TYPE_ min, _INT_TYPE_ max) : m_min(min), m_max(max)             \
       {                                                                           \
       }                                                                           \
     public:                                                                       \
@@ -183,7 +183,7 @@
   template<>                                                                      \
   class FullLutKey<_INT_TYPE_> {                                                  \
     public:                                                                       \
-      FullLutKey<_INT_TYPE_>()                                                    \
+      FullLutKey()                                                                \
       {                                                                           \
       }                                                                           \
     public:                                                                       \
@@ -233,7 +233,7 @@
       float f;
     };
   public:
-    LutKey<float>(float min, float max, float precision) : m_min(min), m_max(max), m_precision(precision)
+    LutKey(float min, float max, float precision) : m_min(min), m_max(max), m_precision(precision)
     {
       // Those values where computed using the test_linear and setting the shift and then using
       // the standard deviation.
