Use OR instead of AND for all classes that have multiple types.

Revert example. Combination of has_as and not has_as are move to tests.
This commit is contained in:
Takatoshi Kondo
2016-08-29 22:12:01 +09:00
parent 9a2bb0c972
commit 5d69c22bf9
11 changed files with 168 additions and 46 deletions

View File

@@ -146,7 +146,7 @@ struct MsgpackTupleConverter<Tuple, 0> {
namespace adaptor {
template <typename... Args>
struct as<msgpack::type::tuple<Args...>, typename std::enable_if<msgpack::all_of<msgpack::has_as, Args...>::value>::type> {
struct as<msgpack::type::tuple<Args...>, typename std::enable_if<msgpack::any_of<msgpack::has_as, Args...>::value>::type> {
msgpack::type::tuple<Args...> operator()(
msgpack::object const& o) const {
if (o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }