Added boost concept checks.
This commit is contained in:
@@ -19,6 +19,8 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/concept/assert.hpp>
|
||||||
|
#include <boost/concept_check.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
//!
|
//!
|
||||||
@@ -47,6 +49,7 @@ public:
|
|||||||
//!
|
//!
|
||||||
explicit attribute(T &object)
|
explicit attribute(T &object)
|
||||||
: reference(object) {
|
: reference(object) {
|
||||||
|
BOOST_CONCEPT_ASSERT((boost::Assignable<T>));
|
||||||
}
|
}
|
||||||
|
|
||||||
//!
|
//!
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/concept/assert.hpp>
|
||||||
|
#include <boost/concept_check.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
namespace string2type {
|
namespace string2type {
|
||||||
@@ -25,6 +27,8 @@ namespace string2type {
|
|||||||
//!
|
//!
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T convert(const std::string &value) {
|
T convert(const std::string &value) {
|
||||||
|
BOOST_CONCEPT_ASSERT((boost::Assignable<T>));
|
||||||
|
|
||||||
return boost::lexical_cast<T>(value);
|
return boost::lexical_cast<T>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user