summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schanda <schanda@itestra.de>2013-10-09 16:32:09 +0200
committerJohannes Schanda <schanda@itestra.de>2013-10-09 16:32:09 +0200
commit42b8420985e461b29b8c9f2c576d616f6f0e78ac (patch)
tree402ef1cfec0cc96f3e52a62d21e552f391792089
parentafe6ec577fc042d783f0defb1336d147208299f6 (diff)
downloadgenivi-common-api-runtime-42b8420985e461b29b8c9f2c576d616f6f0e78ac.tar.gz
Clean up some minor changes required for windows VC++ build
- Add headers where needed - No exception build supported
-rw-r--r--src/CommonAPI/MainLoopContext.h1
-rw-r--r--src/CommonAPI/SerializableVariant.hpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/CommonAPI/MainLoopContext.h b/src/CommonAPI/MainLoopContext.h
index 13bc4d9..2178936 100644
--- a/src/CommonAPI/MainLoopContext.h
+++ b/src/CommonAPI/MainLoopContext.h
@@ -14,6 +14,7 @@
#include <limits>
#include <vector>
#include <chrono>
+#include <functional>
namespace CommonAPI {
diff --git a/src/CommonAPI/SerializableVariant.hpp b/src/CommonAPI/SerializableVariant.hpp
index 2919638..febff2d 100644
--- a/src/CommonAPI/SerializableVariant.hpp
+++ b/src/CommonAPI/SerializableVariant.hpp
@@ -453,8 +453,13 @@ const _Type & Variant<_Types...>::get() const {
if (cType == valueType_) {
return *(reinterpret_cast<const _Type *>(&valueStorage_));
} else {
+#ifdef __EXCEPTIONS
std::bad_cast toThrow;
throw toThrow;
+#else
+ printf("SerializableVariant.hpp:%i %s: Incorrect access to variant; attempting to get type not currently contained", __LINE__, __FUNCTION__);
+ abort();
+#endif
}
}