10000 Tried to fix MSVC compile error · arangodb/arangodb@f6f43b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit f6f43b2

Browse files
committed
Tried to fix MSVC compile error
1 parent 5b10b56 commit f6f43b2

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

arangod/Aql/Functions.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@
7979
#include <boost/uuid/uuid_generators.hpp>
8080
#include <boost/uuid/uuid_io.hpp>
8181

82-
#include <date/date.h>
83-
#include <date/iso_week.h>
8482
#include <s2/s2loop.h>
8583

8684
#include <unicode/schriter.h>
@@ -95,6 +93,17 @@
9593
#include <velocypack/velocypack-aliases.h>
9694
#include <algorithm>
9795

96+
#ifndef _MSC_VER
97+
#include <date/date.h>
98+
#include <date/iso_week.h>
99+
#else
100+
#define real_cplusplus __cplusplus
101+
#define __cplusplus 199711L
102+
#include <date/date.h>
103+
#include <date/iso_week.h>
104+
#define __cplusplus real_cplusplus
105+
#endif
106+
98107
using namespace arangodb;
99108
using namespace arangodb::aql;
100109
using namespace std::chrono;

arangod/Cluster/HeartbeatThread.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <map>
2727

2828
#include <Agency/AsyncAgencyComm.h>
29-
#include <date/date.h>
3029
#include <velocypack/Iterator.h>
3130
#include <velocypack/velocypack-aliases.h>
3231

@@ -56,6 +55,15 @@
5655
#include "Transaction/ClusterUtils.h"
5756
#include "VocBase/vocbase.h"
5857

58+
#ifndef _MSC_VER
59+
#include <date/date.h>
60+
#else
61+
#define real_cplusplus __cplusplus
62+
#define __cplusplus 199711L
63+
#include <date/date.h>
64+
#define __cplusplus real_cplusplus
65+
#endif
66+
5967
using namespace arangodb;
6068
using namespace arangodb::application_features;
6169
using namespace arangodb::rest;

arangod/Indexes/Index.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include <iostream>
2525

26-
#include <date/date.h>
2726
#include <velocypack/Iterator.h>
2827
#include <velocypack/StringRef.h>
2928
#include <velocypack/velocypack-aliases.h>
@@ -48,7 +47,6 @@
4847

4948
using namespace arangodb;
5049
using namespace std::chrono;
51-
using namespace date;
5250

5351
namespace {
5452

tests/Basics/datetime.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@
2424
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
2525
////////////////////////////////////////////////////////////////////////////////
2626

27-
#include <date/date.h>
2827
#include <velocypack/StringRef.h>
2928

3029
#include "Basics/datetime.h"
3130
#include "gtest/gtest.h"
3231

32+
#ifndef _MSC_VER
33+
#include <date/date.h>
34+
#else
35+
#define real_cplusplus __cplusplus
36+
#define __cplusplus 199711L
37+
#include <date/date.h>
38+
#define __cplusplus real_cplusplus
39+
#endif
40+
3341
using namespace arangodb;
3442
using namespace arangodb::basics;
3543

tests/RocksDBEngine/Endian.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "Basics/Endian.h"
2424
#include "RocksDBEngine/RocksDBFormat.h"
2525

26-
#include <date/date.h>
2726
#include "gtest/gtest.h"
2827

2928
using namespace arangodb;

0 commit comments

Comments
 (0)
0