summaryrefslogtreecommitdiff
path: root/src/support/insert_ordered.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-05-17 13:33:56 -0700
committerGitHub <noreply@github.com>2021-05-17 20:33:56 +0000
commit7296f51567d5db95c23247dbec116e35812df5a8 (patch)
tree5aaded4d8b3caf7d305cf71117eef7b711033276 /src/support/insert_ordered.h
parentadba99a760ceb50adb5856e0010fc158163ef607 (diff)
downloadbinaryen-7296f51567d5db95c23247dbec116e35812df5a8.tar.gz
binaryen-7296f51567d5db95c23247dbec116e35812df5a8.tar.bz2
binaryen-7296f51567d5db95c23247dbec116e35812df5a8.zip
Add namespace and include guard to insert_ordered.h (#3891)
Diffstat (limited to 'src/support/insert_ordered.h')
-rw-r--r--src/support/insert_ordered.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/support/insert_ordered.h b/src/support/insert_ordered.h
index 0a5e24ab1..5e3dec96b 100644
--- a/src/support/insert_ordered.h
+++ b/src/support/insert_ordered.h
@@ -14,12 +14,17 @@
* limitations under the License.
*/
+#ifndef wasm_support_insert_ordered_h
+#define wasm_support_insert_ordered_h
+
#include <list>
#include <stddef.h>
#include <unordered_map>
#include "support/utilities.h"
+namespace wasm {
+
// like std::set, except that begin() -> end() iterates in the
// order that elements were added to the set (not in the order
// of operator<(T, T))
@@ -134,3 +139,7 @@ template<typename Key, typename T> struct InsertOrderedMap {
}
bool operator!=(const InsertOrderedMap& other) { return !(*this == other); }
};
+
+} // namespace wasm
+
+#endif // wasm_support_insert_ordered_h