Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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/object
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.