KJB
|
#include <l_serialization.h>
Public Member Functions | |
BOOST_CONCEPT_USAGE (SerializableConcept) | |
Concept check to ensure a type is serializable by boost.
If your template function requires a serializable object, be sure to add a concept check using code like below.
#include <boost/concept_check.hpp> template <class t>=""> void my_func(T& my_object) { #ifdef KJB_HAVE_BST_SERIAL // check that T is serializable BOOST_CONCEPT_CHECK((kjb::SerializableConcept<T>));
... #else KJB_THROW_2(Missing_dependency, "boost::serialization"); #endif }
Note the double parentheses for BOOST_CONCEPT_CHECK, which are required, as well as the guard statements for KJB_HAVE_BST_SERIAL. Also don't forget the include statement for boost's concept check library.
|
inline |