xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
as_const.hpp
Go to the documentation of this file.
1
3
#pragma once
4
#include <type_traits>
5
7
namespace
xtd
{
12
template
<
typename
type_t>
13
[[nodiscard]]
constexpr
auto
as_const
(type_t&
type
)
noexcept
-> std::add_const_t<type_t>& {
14
return
type
;
15
}
16
20
template
<
typename
type_t>
21
[[nodiscard]]
constexpr
auto
as_const
(type_t*
type
)
noexcept
-> std::add_const_t<type_t>* {
22
return
type
;
23
}
24
25
template
<
typename
type_t>
26
auto
as_const
(
const
type_t&&) ->
void
=
delete
;
28
}
xtd::type
std::type_info type
Stores information about a type.
Definition
type.hpp:23
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
xtd::as_const
constexpr auto as_const(type_t &type) noexcept -> std::add_const_t< type_t > &
Obtains a reference to const to its argument.
Definition
as_const.hpp:13
Generated on
for xtd by
Gammasoft
. All rights reserved.