Fix MSVC 19.28+ issue with ByEdgeOrByMeterValue::by_edge and ByEdgeOrByMeterValue::by_meter definitions
This is a workaround for discrepancy between MSVC 19.27 and 19.28 about static const member definition https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338 We can not use C++17 inline variable as a workaround suggested in the issue report linked above, because the sol2 does not seem to compile in C++17 mode: third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of...
This commit is contained in:
parent
a3f1c2afb0
commit
3da45c1d92
@ -25,6 +25,24 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#if (_MSC_VER>=1928)
|
||||||
|
#ifdef _DEBUG
|
||||||
|
namespace osrm
|
||||||
|
{
|
||||||
|
namespace extractor
|
||||||
|
{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
const ByEdgeOrByMeterValue::ValueByEdge ByEdgeOrByMeterValue::by_edge;
|
||||||
|
const ByEdgeOrByMeterValue::ValueByMeter ByEdgeOrByMeterValue::by_meter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace osrm
|
namespace osrm
|
||||||
{
|
{
|
||||||
namespace extractor
|
namespace extractor
|
||||||
|
Loading…
Reference in New Issue
Block a user