Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP3
lucene++
0001-Fix-compilation-with-Boost-1.58.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-compilation-with-Boost-1.58.patch of Package lucene++
From 1987082cf9278a639d772b4f35a8ae2d34944177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= <vaclav@slavik.io> Date: Mon, 4 May 2015 18:04:46 +0200 Subject: [PATCH] Fix compilation with Boost 1.58 1.58 introduces strict type checking in boost::get() and while that's good in theory, the VariantUtils code makes it impractical to use. Instead, use relaxed_get() to get the old behavior. relaxed_get() didn't exist in older versions of Boost, so the code must check BOOST_VERSION. Fixes #93. --- include/VariantUtils.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/VariantUtils.h b/include/VariantUtils.h index 1e6c243..5a72e59 100644 --- a/include/VariantUtils.h +++ b/include/VariantUtils.h @@ -8,6 +8,7 @@ #define VARIANTUTILS_H #include <boost/any.hpp> +#include <boost/version.hpp> #include "Lucene.h" #include "MiscUtils.h" @@ -22,7 +23,11 @@ public: template <typename TYPE, typename VAR> static TYPE get(VAR var) { +#if BOOST_VERSION < 105800 return var.type() == typeid(TYPE) ? boost::get<TYPE>(var) : TYPE(); +#else + return var.type() == typeid(TYPE) ? boost::relaxed_get<TYPE>(var) : TYPE(); +#endif } template <typename TYPE, typename VAR> -- 2.4.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor