Better handler_ptr (API Change):

fix #242

* Add public constructors
* Add handler_ptr::empty()
* Add handler_ptr::element_type
* Remove make_handler_ptr free function
* Compiler error if element_type is an array type
* handler_ptr::get() returns nullptr if no object is owned
This commit is contained in:
Vinnie Falco
2017-02-01 20:05:38 -05:00
parent ca38657aab
commit 0474cc5df2
17 changed files with 131 additions and 126 deletions
+2 -3
View File
@@ -53,9 +53,8 @@ public:
template<class DeducedHandler, class... Args>
parse_op(DeducedHandler&& h, Stream& s, Args&&... args)
: d_(make_handler_ptr<data, Handler>(
std::forward<DeducedHandler>(h), s,
std::forward<Args>(args)...))
: d_(std::forward<DeducedHandler>(h),
s, std::forward<Args>(args)...)
{
(*this)(error_code{}, 0, false);
}