summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-06 23:28:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-07 13:51:56 +0100
commitb9f43acf9c4f2f800456bb19a5fd0879541cabc6 (patch)
tree838839748d634ac74994a0925fc48d197b3cbb2d /include
parentcc8fe0de36edb1c3a6d8dc940b6d61d3f986adc5 (diff)
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@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/o3tl/optional.hxx2
1 files changed, 1 insertions, 1 deletions
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