Skip to content

Commit c616911

Browse files
committed
rt: Make rust_shape.h able to be included in more contexts
1 parent 35016d3 commit c616911

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rt/rust_shape.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
#ifndef RUST_SHAPE_H
55
#define RUST_SHAPE_H
66

7+
// Tell ISAAC to let go of max() and min() defines.
8+
#undef max
9+
#undef min
10+
11+
#include <iostream>
712
#include "rust_internal.h"
813

914
// ISAAC pollutes our namespace.
@@ -128,7 +133,7 @@ struct size_align {
128133

129134
inline void add(size_t extra_size, size_t extra_align) {
130135
size += extra_size;
131-
alignment = max(alignment, extra_align);
136+
alignment = std::max(alignment, extra_align);
132137
}
133138

134139
static inline size_align make(size_t in_size) {

0 commit comments

Comments
 (0)