Files
meta.hpp/headers/meta.hpp/meta_binds/nullptr_bind.hpp
2022-02-12 08:40:17 +07:00

28 lines
944 B
C++

/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/meta.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2021-2022, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#pragma once
#include "../meta_base.hpp"
#include "../meta_binds.hpp"
#include "../meta_detail/type_registry.hpp"
namespace meta_hpp
{
template < detail::nullptr_kind Nullptr >
nullptr_bind<Nullptr>::nullptr_bind(type_opts opts)
: data_{detail::type_access(detail::resolve_type<Nullptr>())} {
data_->metadata.swap(opts.metadata);
data_->metadata.merge(opts.metadata);
}
template < detail::nullptr_kind Nullptr >
nullptr_bind<Nullptr>::operator nullptr_type() const noexcept {
return nullptr_type{data_};
}
}