Changeset 10774 for code/branches/cpp11_v2/src/libraries
- Timestamp:
- Nov 7, 2015, 10:46:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries
- Files:
-
- 7 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
Note: See TracChangeset
for help on using the changeset viewer.