Changeset 10774 for code/branches/cpp11_v2
- Timestamp:
- Nov 7, 2015, 10:46:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
r10769 r10774 80 80 #include <typeinfo> 81 81 #include <loki/TypeTraits.h> 82 #include <boost/static_assert.hpp>83 #include <boost/type_traits/is_base_of.hpp>84 82 85 83 #include "util/Output.h" … … 269 267 class ClassIdentifier : public Identifier 270 268 { 271 BOOST_STATIC_ASSERT((boost::is_base_of<Identifiable, T>::value));269 static_assert(std::is_base_of<Identifiable, T>::value, "ClassIdentifier can only be used with Identifiables"); 272 270 273 271 #ifndef DOXYGEN_SHOULD_SKIP_THIS -
code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h
r10770 r10774 37 37 38 38 #include "core/CorePrereqs.h" 39 40 #include <boost/static_assert.hpp>41 #include <boost/type_traits/is_base_of.hpp>42 39 43 40 #include "ObjectListBase.h" … … 52 49 class IteratorBase : public ObjectListElementRemovalListener 53 50 { 54 BOOST_STATIC_ASSERT((boost::is_base_of<Listable, T>::value));51 static_assert(std::is_base_of<Listable, T>::value, "IteratorBase can only be used with Listables"); 55 52 56 53 public: -
code/branches/cpp11_v2/src/libraries/core/object/ObjectList.h
r10736 r10774 47 47 #include "core/CorePrereqs.h" 48 48 49 #include <boost/static_assert.hpp>50 #include <boost/type_traits/is_base_of.hpp>51 52 49 #include "ObjectListBase.h" 53 50 #include "ObjectListIterator.h" … … 69 66 class ObjectList 70 67 { 71 BOOST_STATIC_ASSERT((boost::is_base_of<Listable, T>::value));68 static_assert(std::is_base_of<Listable, T>::value, "ObjectList can only be used with Listables"); 72 69 73 70 public: -
code/branches/cpp11_v2/src/libraries/network/Connection.h
r8327 r10774 46 46 #include <map> 47 47 #include <enet/enet.h> 48 #include <boost/concept_check.hpp>49 48 50 49 namespace boost -
code/branches/cpp11_v2/src/libraries/network/GamestateManager.h
r10769 r10774 47 47 #include "core/CorePrereqs.h" 48 48 #include "packet/Gamestate.h" 49 #include <boost/concept_check.hpp>50 49 51 50 namespace orxonox -
code/branches/cpp11_v2/src/libraries/network/NetworkFunctionIncludes.h
r10624 r10774 33 33 34 34 #include <boost/preprocessor/cat.hpp> 35 #include <boost/static_assert.hpp>36 35 37 36 #include "NetworkFunction.h" … … 72 71 inline NetworkFunctionBase* registerStaticNetworkFunctionFct(PT ptr, const std::string& name) 73 72 { 74 BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for static functions than defined above73 static_assert(sizeof(PT) <= sizeof(NetworkFunctionPointer), "check pointer size"); // if this fails your compiler uses bigger pointers for static functions than defined above 75 74 NetworkFunctionPointer destptr; 76 75 copyPtr(ptr, destptr); … … 81 80 inline NetworkFunctionBase* registerMemberNetworkFunctionFct(PT ptr, const std::string& name) 82 81 { 83 BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above82 static_assert(sizeof(PT) <= sizeof(NetworkFunctionPointer), "check pointer size"); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above 84 83 NetworkFunctionPointer destptr; 85 84 copyPtr(ptr, destptr); -
code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc
r10768 r10774 34 34 #define WIN32_LEAN_AND_MEAN 35 35 #include <enet/enet.h> 36 #include <boost/static_assert.hpp>37 36 #include <boost/thread/mutex.hpp> 38 37 … … 54 53 55 54 // Make sure we assume the right values 56 BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::Reliable) == static_cast<int>(ENET_PACKET_FLAG_RELIABLE));57 BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::Unsequenced) == static_cast<int>(ENET_PACKET_FLAG_UNSEQUENCED));58 BOOST_STATIC_ASSERT(static_cast<int>(PacketFlag::NoAllocate) == static_cast<int>(ENET_PACKET_FLAG_NO_ALLOCATE));55 static_assert(static_cast<int>(PacketFlag::Reliable) == static_cast<int>(ENET_PACKET_FLAG_RELIABLE), "check enum"); 56 static_assert(static_cast<int>(PacketFlag::Unsequenced) == static_cast<int>(ENET_PACKET_FLAG_UNSEQUENCED), "check enum"); 57 static_assert(static_cast<int>(PacketFlag::NoAllocate) == static_cast<int>(ENET_PACKET_FLAG_NO_ALLOCATE), "check enum"); 59 58 60 59 #define PACKET_FLAG_DEFAULT PacketFlag::NoAllocate -
code/branches/cpp11_v2/src/modules/overlays/OverlayText.cc
r9667 r10774 32 32 #include <OgrePanelOverlayElement.h> 33 33 #include <OgreTextAreaOverlayElement.h> 34 #include <boost/static_assert.hpp>35 34 36 35 #include "util/StringUtils.h" … … 43 42 RegisterClass(OverlayText); 44 43 45 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left == (int)OverlayText::Left);46 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center);47 BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right == (int)OverlayText::Right);44 static_assert((int)Ogre::TextAreaOverlayElement::Left == (int)OverlayText::Left, "check enum"); 45 static_assert((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center, "check enum"); 46 static_assert((int)Ogre::TextAreaOverlayElement::Right == (int)OverlayText::Right, "check enum"); 48 47 49 48 OverlayText::OverlayText(Context* context) -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
r10769 r10774 53 53 #include "core/config/ConfigValueIncludes.h" 54 54 #include "tools/TextureGenerator.h" 55 // #include <boost/bind/bind_template.hpp>56 55 57 56 -
code/branches/cpp11_v2/src/orxonox/graphics/Light.cc
r10768 r10774 31 31 #include <OgreSceneManager.h> 32 32 #include <OgreLight.h> 33 #include <boost/static_assert.hpp>34 33 35 34 #include "util/StringUtils.h" … … 45 44 46 45 // Be sure we don't do bad conversions 47 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT == (int)Light::Point);48 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional);49 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT == (int)Light::Spotlight);46 static_assert((int)Ogre::Light::LT_POINT == (int)Light::Point, "check enum"); 47 static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional, "check enum"); 48 static_assert((int)Ogre::Light::LT_SPOTLIGHT == (int)Light::Spotlight, "check enum"); 50 49 51 50 Light::Light(Context* context) : StaticEntity(context) -
code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
r10768 r10774 37 37 #include <OgreSceneNode.h> 38 38 #include <BulletDynamics/Dynamics/btRigidBody.h> 39 #include <boost/static_assert.hpp>40 39 41 40 #include "util/OrxAssert.h" … … 57 56 58 57 // Be sure we don't do bad conversions 59 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL == (int)WorldEntity::Local);60 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent);61 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD == (int)WorldEntity::World);58 static_assert((int)Ogre::Node::TS_LOCAL == (int)WorldEntity::Local, "check enum"); 59 static_assert((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent, "check enum"); 60 static_assert((int)Ogre::Node::TS_WORLD == (int)WorldEntity::World, "check enum"); 62 61 63 62 RegisterAbstractClass(WorldEntity).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
Note: See TracChangeset
for help on using the changeset viewer.