Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10466


Ignore:
Timestamp:
May 25, 2015, 11:33:05 AM (9 years ago)
Author:
landauf
Message:

added static assertions to validate the type of certain templates

Location:
code/branches/core7/src/libraries/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/class/Identifier.h

    r10422 r10466  
    8080#include <typeinfo>
    8181#include <loki/TypeTraits.h>
     82#include <boost/static_assert.hpp>
     83#include <boost/type_traits/is_base_of.hpp>
    8284
    8385#include "util/Output.h"
     
    257259    class ClassIdentifier : public Identifier
    258260    {
     261        BOOST_STATIC_ASSERT(boost::is_base_of<Identifiable, T>::value);
     262
    259263        #ifndef DOXYGEN_SHOULD_SKIP_THIS
    260264          #define SUPER_INTRUSIVE_DECLARATION_INCLUDE
  • code/branches/core7/src/libraries/core/object/IteratorBase.h

    r9667 r10466  
    3737
    3838#include "core/CorePrereqs.h"
     39
     40#include <boost/static_assert.hpp>
     41#include <boost/type_traits/is_base_of.hpp>
    3942
    4043#include "ObjectListBase.h"
     
    4952    class IteratorBase : public ObjectListElementRemovalListener
    5053    {
     54        BOOST_STATIC_ASSERT(boost::is_base_of<Listable, T>::value);
     55
    5156        public:
    5257            /**
  • code/branches/core7/src/libraries/core/object/ObjectList.h

    r9667 r10466  
    4747#include "core/CorePrereqs.h"
    4848
     49#include <boost/static_assert.hpp>
     50#include <boost/type_traits/is_base_of.hpp>
     51
    4952#include "ObjectListBase.h"
    5053#include "ObjectListIterator.h"
     
    6669    class ObjectList
    6770    {
     71        BOOST_STATIC_ASSERT(boost::is_base_of<Listable, T>::value);
     72
    6873        public:
    6974            typedef ObjectListIterator<T> iterator;
Note: See TracChangeset for help on using the changeset viewer.