summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-08-10 10:22:38 -0400
committerKonstantin Käfer <mail@kkaefer.com>2018-08-14 17:03:46 -0700
commita3b6fc149895a7f4c29acd6bba70546edec41438 (patch)
tree328880a17273390bd131af51481b9bcf8059fc21 /include
parentc96d9df798b9baba5134f4d22127b9ba044742b4 (diff)
downloadqtlocation-mapboxgl-a3b6fc149895a7f4c29acd6bba70546edec41438.tar.gz
[build] vendor std::expected polyfill
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/util/expected.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/mbgl/util/expected.hpp b/include/mbgl/util/expected.hpp
new file mode 100644
index 0000000000..a45f071065
--- /dev/null
+++ b/include/mbgl/util/expected.hpp
@@ -0,0 +1,16 @@
+#pragma once
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <expected.hpp>
+#pragma GCC diagnostic pop
+
+namespace mbgl {
+
+template <class T, class E>
+using expected = nonstd::expected<T, E>;
+
+template <class E>
+using unexpected = nonstd::unexpected_type<E>;
+
+} // namespace mbgl