summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-13 13:36:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-13 16:46:07 +0200
commit27e7a6199231b8b9942724c86d0a22126e71862e (patch)
treea74211034cee3912725c5ab41fdcca375fdbaebe /codemaker
parent282f9206b77a03e1864f2f9d4f9c17086495d447 (diff)
Follow-up on "Make sure __cpp_lib_source_location is consistently defined"
(113e064117b2632974a696b950634229d70c5b96). Mike pointed out that I forgot to fix the generated code and that "https://en.cppreference.com/w/cpp/compiler_support/20 lists <version> as supported since gcc libstdc++ 9, and README.md requires libstdc++ 8.5." Change-Id: Ic7477e39e334735c4a563195fee335a599a0ef79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157933 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 235e55017610..514e99915834 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3014,6 +3014,9 @@ void ExceptionType::dumpHdlFile(
if (name_ == "com.sun.star.uno.Exception")
{
includes.addCustom("#if defined(LIBO_INTERNAL_ONLY)");
+ includes.addCustom("#if __has_include(<version>)");
+ includes.addCustom("#include <version>");
+ includes.addCustom("#endif");
includes.addCustom("#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907");
includes.addCustom("#include <source_location>");
includes.addCustom("#define LIBO_USE_SOURCE_LOCATION std");