xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
new_sptr.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
sptr.hpp
"
6
#include <utility>
7
9
namespace
xtd
{
23
template
<
typename
type_t,
typename
...args_t>
24
[[nodiscard]]
auto
new_sptr
(args_t&& ... args) ->
xtd::sptr<type_t>
{
return
xtd::sptr<type_t>
{
new
type_t(std::forward<args_t>(args)...)};}
25
27
template
<
typename
type_t>
28
[[nodiscard]]
auto
new_sptr
(
const
type_t& arg) ->
xtd::sptr<type_t>
{
return
xtd::sptr<type_t>
{
new
type_t(arg)};}
29
30
template
<
typename
type_t>
31
[[nodiscard]]
auto
new_sptr
() ->
xtd::sptr<type_t>
{
return
xtd::sptr<type_t>
(
new
type_t);}
33
}
xtd::sptr
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition
sptr.hpp:25
xtd::new_sptr
auto new_sptr(args_t &&... args) -> xtd::sptr< type_t >
xtd::new_sptr operator creates a xtd::sptr object.
Definition
new_sptr.hpp:24
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
sptr.hpp
Contains xtd::sptr type.
Generated on
for xtd by
Gammasoft
. All rights reserved.