asserts.hpp File Reference
#include "common.hpp"
#include <boost/concept/assert.hpp>
#include <boost/concept_check.hpp>
#include <type_traits>
+ Include dependency graph for asserts.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nfd::detail::StlForwardIteratorConcept< T >
 

Namespaces

 nfd
 Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.
 
 nfd::detail
 

Macros

#define NFD_ASSERT_DEFAULT_CONSTRUCTIBLE(T)
 assert T is default constructible More...
 
#define NFD_ASSERT_FORWARD_ITERATOR(T)
 assert T is a forward iterator More...
 

Macro Definition Documentation

#define NFD_ASSERT_DEFAULT_CONSTRUCTIBLE (   T)
Value:
static_assert(std::is_default_constructible<T>::value, \
#T " must be default-constructible"); \
BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<T>))

assert T is default constructible

See also
http://en.cppreference.com/w/cpp/concept/DefaultConstructible

Definition at line 52 of file asserts.hpp.

#define NFD_ASSERT_FORWARD_ITERATOR (   T)
Value:
BOOST_CONCEPT_ASSERT((::nfd::detail::StlForwardIteratorConcept<T>)); \
static_assert(std::is_default_constructible<T>::value, \
#T " must be default-constructible")

assert T is a forward iterator

See also
http://en.cppreference.com/w/cpp/concept/ForwardIterator
Note
A forward iterator should be default constructible, but boost::ForwardIterator follows SGI standard which doesn't require DefaultConstructible, so a separate check is needed.

Definition at line 62 of file asserts.hpp.