[Libreoffice-commits] core.git: include/o3tl
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sat Dec 7 12:52:38 UTC 2019
include/o3tl/optional.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b9f43acf9c4f2f800456bb19a5fd0879541cabc6
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Dec 6 23:28:33 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Dec 7 13:51:56 2019 +0100
Better not use constexpr here
With a locally modified include/o3tl/optional.hxx to always pick the
boost::optional branch, to prepare <https://gerrit.libreoffice.org/#/c/84672/>
"Fix more new dependencies on boost_headers", that constexpr caused
> In file included from idlc/source/errorhandler.cxx:20:
> In file included from idlc/inc/errorhandler.hxx:23:
> In file included from idlc/inc/astexpression.hxx:27:
> include/o3tl/optional.hxx:28:23: error: constexpr variable cannot have non-literal type 'const boost::none_t'
> inline constexpr auto nullopt = boost::none;
> ^
> workdir/UnpackedTarball/boost/boost/none_t.hpp:29:8: note: 'none_t' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors
> struct none_t
> ^
at least with recent Clang 10 trunk and --without-system-boost.
Change-Id: I679a6ca5d135d3f5571845a15afe20d28a1f9039
Reviewed-on: https://gerrit.libreoffice.org/84673
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/o3tl/optional.hxx b/include/o3tl/optional.hxx
index 6da85698c2d8..524818230e3e 100644
--- a/include/o3tl/optional.hxx
+++ b/include/o3tl/optional.hxx
@@ -25,7 +25,7 @@ namespace o3tl
using boost::make_optional;
using boost::optional;
-inline constexpr auto nullopt = boost::none;
+inline auto const nullopt = boost::none;
}
#else
More information about the Libreoffice-commits
mailing list