Sha256: b5a335b76d28ddbbd05ac5a5e77605203fe1fd28c827b371cee73ee85e3db2be
Contents?: true
Size: 633 Bytes
Versions: 6
Compression:
Stored size: 633 Bytes
Contents
// Copyright (c) 2022 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/json/ #ifndef TAO_JSON_EVENTS_VIRTUALIZE_HPP #define TAO_JSON_EVENTS_VIRTUALIZE_HPP #include <type_traits> #include "virtual_base.hpp" #include "virtual_ref.hpp" namespace tao::json::events { template< typename Consumer > [[nodiscard]] decltype( auto ) virtualize( Consumer& c ) noexcept { if constexpr( std::is_base_of_v< virtual_base, Consumer > ) { return c; } else { return events::virtual_ref( c ); } } } // namespace tao::json::events #endif
Version data entries
6 entries across 6 versions & 1 rubygems