KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
kjb::SerializableConcept< X > Struct Template Reference

#include <l_serialization.h>

Public Member Functions

 BOOST_CONCEPT_USAGE (SerializableConcept)
 

Detailed Description

template<class X>
struct kjb::SerializableConcept< X >

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.

Member Function Documentation

template<class X >
kjb::SerializableConcept< X >::BOOST_CONCEPT_USAGE ( SerializableConcept< X >  )
inline

The documentation for this struct was generated from the following file: