Skip to content

Commit 2654d7b

Browse files
authored
Merge pull request #538 from tautschnig/fix-531-532
VisualStudio build fixes
2 parents 8e68cad + 50f7eb1 commit 2654d7b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/goto-programs/goto_program_template.h

+7
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,15 @@ class goto_program_templatet
216216
}
217217

218218
//! Uniquely identify an invalid target or location
219+
#if (defined _MSC_VER && _MSC_VER <= 1800)
220+
// Visual Studio <= 2013 does not support constexpr, making
221+
// numeric_limits::max() unviable for a static const member
222+
static const unsigned nil_target=
223+
static_cast<unsigned>(-1);
224+
#else
219225
static const unsigned nil_target=
220226
std::numeric_limits<unsigned>::max();
227+
#endif
221228

222229
//! A globally unique number to identify a program location.
223230
//! It's guaranteed to be ordered in program order within

src/goto-programs/remove_static_init_loops.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include <algorithm>
10+
911
#include <util/message.h>
1012
#include <util/suffix.h>
1113
#include <util/string2int.h>

src/solvers/prop/aig.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Author: Daniel Kroening, [email protected]
88

99
#include <cassert>
1010
#include <ostream>
11-
11+
#include <string>
1212

1313
#include "aig.h"
1414

0 commit comments

Comments
 (0)