Index: /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.h	(revision 10995)
+++ /code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.h	(revision 10996)
@@ -38,4 +38,5 @@
 #include <queue>
 #include <set>
+#include <type_traits>
 
 #include "util/mbool.h"
@@ -203,14 +204,26 @@
   };
 
-  template <class T> void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-  {
+  namespace detail
+  {
+    template <class T, bool = std::is_enum<T>::value>
+    struct RealType;
+    template <class T>
+    struct RealType<T, true> { typedef typename std::underlying_type<T>::type type; };
+    template <class T>
+    struct RealType<T, false> { typedef T type; };
+  }
+
+  template <class T>
+  void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    typedef typename detail::RealType<T>::type RealType;
     if (bidirectional)
     {
-      syncList_.push_back(new SynchronisableVariableBidirectional<T>(variable, mode, cb));
+      syncList_.push_back(new SynchronisableVariableBidirectional<RealType>(reinterpret_cast<RealType&>(variable), mode, cb));
       this->dataSize_ += syncList_.back()->getSize(state_);
     }
     else
     {
-      syncList_.push_back(new SynchronisableVariable<T>(variable, mode, cb));
+      syncList_.push_back(new SynchronisableVariable<RealType>(reinterpret_cast<RealType&>(variable), mode, cb));
       if ( this->state_ == mode )
         this->dataSize_ += syncList_.back()->getSize(state_);
@@ -218,5 +231,6 @@
   }
   
-  template <class T> void Synchronisable::unregisterVariable(T& variable)
+  template <class T>
+  void Synchronisable::unregisterVariable(T& variable)
   {
     std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin();
@@ -238,11 +252,13 @@
   }
 
-  template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-  {
+  template <class T>
+  void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    typedef typename detail::RealType<T>::type RealType;
     SynchronisableVariableBase* sv;
     if (bidirectional)
-      sv = new SynchronisableVariableBidirectional<std::set<T>>(variable, mode, cb);
+      sv = new SynchronisableVariableBidirectional<std::set<RealType>>(reinterpret_cast<std::set<RealType>&>(variable), mode, cb);
     else
-      sv = new SynchronisableVariable<std::set<T>>(variable, mode, cb);
+      sv = new SynchronisableVariable<std::set<RealType>>(reinterpret_cast<std::set<RealType>&>(variable), mode, cb);
     syncList_.push_back(sv);
     stringList_.push_back(sv);
Index: /code/branches/cpp11_v2/src/orxonox/graphics/Light.cc
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/graphics/Light.cc	(revision 10995)
+++ /code/branches/cpp11_v2/src/orxonox/graphics/Light.cc	(revision 10996)
@@ -44,7 +44,7 @@
 
     // Be sure we don't do bad conversions
-    static_assert((int)Ogre::Light::LT_POINT       == (int)Light::Point,       "check enum");
-    static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional, "check enum");
-    static_assert((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight,   "check enum");
+    static_assert((int)Ogre::Light::LT_POINT       == (int)Light::Type::Point,       "check enum");
+    static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Type::Directional, "check enum");
+    static_assert((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Type::Spotlight,   "check enum");
 
     Light::Light(Context* context) : StaticEntity(context)
@@ -55,5 +55,5 @@
         this->diffuse_ = ColourValue::White;
         this->specular_ = ColourValue::White;
-        this->type_ = Light::Point;
+        this->type_ = Type::Point;
         this->attenuation_ = Vector4(100000, 1, 0, 0);
         this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
@@ -105,5 +105,5 @@
     void Light::registerVariables()
     {
-        registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
+        registerVariable(this->type_,           VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
         registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
         registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
@@ -126,5 +126,5 @@
     void Light::updateAttenuation()
     {
-        if (this->light_ && this->type_ != Light::Directional)
+        if (this->light_ && this->type_ != Type::Directional)
             this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
     }
@@ -132,5 +132,5 @@
     void Light::updateSpotlightRange()
     {
-        if (this->light_ && this->type_ == Light::Spotlight)
+        if (this->light_ && this->type_ == Type::Spotlight)
             this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
     }
@@ -139,11 +139,11 @@
     {
         if (type == "point")
-            this->setType(Light::Point);
+            this->setType(Type::Point);
         else if (type == "directional")
-            this->setType(Light::Directional);
+            this->setType(Type::Directional);
         else if (type == "spotlight")
-            this->setType(Light::Spotlight);
+            this->setType(Type::Spotlight);
         else
-            this->setType(Light::Point);
+            this->setType(Type::Point);
     }
 
@@ -152,9 +152,9 @@
         switch (this->type_)
         {
-            case Light::Directional:
+            case Type::Directional:
                 return "directional";
-            case Light::Spotlight:
+            case Type::Spotlight:
                 return "spotlight";
-            case Light::Point:
+            case Type::Point:
             default:
                 return "point";
@@ -168,7 +168,7 @@
             this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
 
-            if (this->type_ != Light::Directional)
+            if (this->type_ != Type::Directional)
                 this->updateAttenuation();
-            if (this->type_ == Light::Spotlight)
+            if (this->type_ == Type::Spotlight)
                 this->updateSpotlightRange();
         }
Index: /code/branches/cpp11_v2/src/orxonox/graphics/Light.h
===================================================================
--- /code/branches/cpp11_v2/src/orxonox/graphics/Light.h	(revision 10995)
+++ /code/branches/cpp11_v2/src/orxonox/graphics/Light.h	(revision 10996)
@@ -42,5 +42,5 @@
     {
         public:
-            enum LightTypes // Copy from the Ogre enum
+            enum class Type // Copy from the Ogre enum
             {
                 /// Point light sources give off light equally in all directions, so require only position not direction
@@ -63,7 +63,7 @@
                 { return this->light_; }
 
-            inline void setType(Light::LightTypes type)
+            inline void setType(Light::Type type)
                 { this->type_ = type; this->updateType(); }
-            inline Light::LightTypes getType() const
+            inline Light::Type getType() const
                 { return this->type_; }
 
@@ -144,5 +144,5 @@
 
             Ogre::Light* light_;
-            LightTypes type_;
+            Light::Type type_;
             ColourValue diffuse_;
             ColourValue specular_;
