aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-23 18:23:11 -0700
committerChad Austin <chad@imvu.com>2013-05-02 18:54:36 -0700
commit9e375f0d243fbd21289283d2f61836ddfc4983c2 (patch)
tree5f0eb9ad4bd2111690bdbdbbe0ba5bc7601a8bd9 /system
parent6566a0c989b101572c8154bbd43cc6a07532bada (diff)
snip dead code
Diffstat (limited to 'system')
-rwxr-xr-xsystem/include/emscripten/bind.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index d5b2fe6a..ff7feacf 100755
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -1233,74 +1233,6 @@ namespace emscripten {
TypeID<const ConstantType&>::get(),
asGenericValue(BindingType<const ConstantType&>::toWireType(v)));
}
-
- namespace internal {
- template<typename T>
- class optional {
- public:
- optional()
- : initialized(false)
- {}
-
- ~optional() {
- if (initialized) {
- get()->~T();
- }
- }
-
- optional(const optional& rhs)
- : initialized(false)
- {
- *this = rhs;
- }
-
- T& operator*() {
- assert(initialized);
- return *get();
- }
-
- const T& operator*() const {
- assert(initialized);
- return *get();
- }
-
- explicit operator bool() const {
- return initialized;
- }
-
- optional& operator=(const T& v) {
- if (initialized) {
- get()->~T();
- }
- new(get()) T(v);
- initialized = true;
- return *this;
- }
-
- optional& operator=(const optional& o) {
- if (initialized) {
- get()->~T();
- }
- if (o.initialized) {
- new(get()) T(*o);
- }
- initialized = o.initialized;
- return *this;
- }
-
- private:
- T* get() {
- return reinterpret_cast<T*>(&data);
- }
-
- T const* get() const {
- return reinterpret_cast<T const*>(&data);
- }
-
- bool initialized;
- typename std::aligned_storage<sizeof(T)>::type data;
- };
- }
}
namespace emscripten {