Sha256: c1a1ba837deba271cd3f651ee99160d5330b8c8b0f79ee1f93f8b172de42f6da

Contents?: true

Size: 1.68 KB

Versions: 18

Compression:

Stored size: 1.68 KB

Contents

//
// MessagePack for C++ static resolution routine
//
// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi
//
//    Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE_1_0.txt or copy at
//    http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MSGPACK_V3_OBJECT_FWD_HPP
#define MSGPACK_V3_OBJECT_FWD_HPP

#include "msgpack/v3/object_fwd_decl.hpp"
#include "msgpack/object_fwd.hpp"

namespace msgpack {

/// @cond
MSGPACK_API_VERSION_NAMESPACE(v3) {
/// @endcond

#if !defined(MSGPACK_USE_CPP03)

namespace adaptor {

// If v2 has as specialization for T, then dispatch v2::adaptor::as<T>.
// So I call v2::has_as<T> meta function intentionally.
template <typename T>
struct as<T, typename std::enable_if<v2::has_as<T>::value>::type> : v2::adaptor::as<T> {
};

} // namespace adaptor

template <typename T>
struct has_as {
private:
    template <typename U>
    static auto check(U*) ->
        typename std::enable_if<
            // check v3 specialization
            std::is_same<
                decltype(adaptor::as<U>()(std::declval<msgpack::object>())),
                U
            >::value
            ||
            // check v2 specialization
            v2::has_as<U>::value
            ||
            // check v1 specialization
            v1::has_as<U>::value,
            std::true_type
        >::type;
    template <typename...>
    static std::false_type check(...);
public:
    using type = decltype(check<T>(MSGPACK_NULLPTR));
    static constexpr bool value = type::value;
};

#endif // !defined(MSGPACK_USE_CPP03)


/// @cond
} // MSGPACK_API_VERSION_NAMESPACE(v3)
/// @endcond

} // namespace msgpack

#endif // MSGPACK_V3_OBJECT_FWD_HPP

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
script_core-0.3.2 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.3.0 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.7 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.6 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.5 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.4 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.3 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.2 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.1 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
script_core-0.2.0 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.7-x64-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.7-x86-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
script_core-0.1.1 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.3-x64-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.3-x86-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.2-x64-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
rroonga-9.0.2-x86-mingw32 vendor/local/include/msgpack/v3/object_fwd.hpp
script_core-0.1.0 ext/enterprise_script_service/msgpack/include/msgpack/v3/object_fwd.hpp