xtd 0.2.0
Loading...
Searching...
No Matches

◆ new_sptr()

template<typename type_t , typename ... args_t>
sptr< type_t > xtd::new_sptr ( args_t &&...  args)

xtd::news_sptr operator creates a xtd::sptr object.

Library
xtd.core
Examples
this is example shows to use xtd::new_sptr with xtd::version class
sptr<xtd::version> version = new_sptr<xtd::version>(1, 2, 3);
delete_ptr(version); // Not mandatory.
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
xtd::string to_string() const noexcept override
Converts the value of the current xtd::version object to its equivalent xtd::string representation.
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.h:114
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
void delete_ptr(sptr< type_t > &ptr)
xtd::delete_ptr operator delete a xtd::sptr or xtd::ptr object.
Definition delete_ptr.h:27
Remarks
The xtd::new_sptr is equivalent to std::make_shared.