office-gobmx/external/firebird/c++20.patch
Stephan Bergmann fdf7bd6c1c Don't artificially limit external/firebird to -std=gnu++11 on Linux
0a42105a8d "firebird: fix CXXFLAGS" had added this
to override Firebird's internal -std=gnu++03, but even back then the CXXFLAGS
set there already included $(CXXFLAGS_CXX11) (so adding an explicit -std=gnu++11
should never have been necessary), and CXXFLAGS_CXX11 has by now moved beyond
-std=gnu++11 to at least -std=c++20.

Which reveals that the code has a C++20 incompatibility that only GCC so far
complains about (see the mailing list thread starting at
<https://lists.isocpp.org/std-discussion/2024/01/2482.php> "simple-template-id
in a constructor declaration"),

> In file included from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/../jrd/../common/classes/fb_string.h:39,
>                  from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/../jrd/ods.h:38,
>                  from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/../common/dsc.h:32,
>                  from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/../gpre/gpre.h:1514,
>                  from /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/gpre/hsh.cpp:31:
> /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/include/../common/classes/alloc.h:264:36: error: expected ')' before '*' token
>   264 |                 SubsystemThreadData* subThreadData,
>       |                                    ^
>       |                                    )
> /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/firebird/src/include/../common/classes/alloc.h:263:9: note: to match this '('
>   263 |         (
>       |         ^

(<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/157406/>), etc.

Change-Id: I89839452a0d474467ae62e57b6c990354e10f142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162209
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-18 17:00:46 +01:00

61 lines
1.5 KiB
Diff

--- src/common/classes/Nullable.h
+++ src/common/classes/Nullable.h
@@ -113,19 +113,19 @@
template <typename T> class Nullable : public BaseNullable<T>
{
public:
- explicit Nullable<T>(const T& v)
+ explicit Nullable(const T& v)
{
this->value = v;
this->specified = true;
}
- Nullable<T>(const Nullable<T>& o)
+ Nullable(const Nullable<T>& o)
{
this->value = o.value;
this->specified = o.specified;
}
- Nullable<T>()
+ Nullable()
{
NullableClear<T>::clear(this->value);
this->specified = false;
--- src/common/classes/alloc.h
+++ src/common/classes/alloc.h
@@ -259,7 +259,7 @@
class SubsystemContextPoolHolder : public ContextPoolHolder
{
public:
- SubsystemContextPoolHolder <SubsystemThreadData, SubsystemPool>
+ SubsystemContextPoolHolder
(
SubsystemThreadData* subThreadData,
SubsystemPool* newPool
--- src/common/classes/stack.h
+++ src/common/classes/stack.h
@@ -36,7 +36,7 @@
class Stack : public AutoStorage
{
private:
- Stack<Object, Capacity>(Stack<Object, Capacity>&); // not implemented
+ Stack(Stack<Object, Capacity>&); // not implemented
class Entry : public Vector<Object, Capacity>
{
@@ -117,11 +117,11 @@
Entry* stk_cache;
public:
- explicit Stack<Object, Capacity>(MemoryPool& p)
+ explicit Stack(MemoryPool& p)
: AutoStorage(p), stk(0), stk_cache(0)
{ }
- Stack<Object, Capacity>() : AutoStorage(), stk(0), stk_cache(0) { }
+ Stack() : AutoStorage(), stk(0), stk_cache(0) { }
~Stack()
{