xtd 0.2.0
as_const.hpp
Go to the documentation of this file.
1
3#pragma once
4#include <type_traits>
5
7namespace xtd {
12 template<class type_t>
13 constexpr std::add_const_t<type_t>& as_const(type_t& type) noexcept {
14 return type;
15 }
17 template<class type_t>
18 void as_const(const type_t&&) = delete;
20}
std::type_info type
Stores information about a type.
Definition type.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
constexpr std::add_const_t< type_t > & as_const(type_t &type) noexcept
Obtains a reference to const to its argument.
Definition as_const.hpp:13