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

◆ is_not_null() [18/24]

template<typename pointer_t >
static void xtd::tunit::valid::is_not_null ( const xtd::wptr< pointer_t > &  pointer,
const xtd::diagnostics::stack_frame stack_frame 
)
inlinestatic

Validates that the pointer is not null.

Parameters
pointerThe pointer to check is null.
stack_frameContains information about current file and current line.
Remarks
Always true, a xtd::wptr can't be equal to nullptr by construction or assignation.
Examples
xtd::sptr<std::string> s = xtd::new_sptr<std::string>("Anything");
static void is_not_null(const pointer_t *pointer)
Validates that the pointer is not null.
Definition valid.h:1348
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30
std::weak_ptr< type_t > wptr
The xtd::uptr object is a weak pointer.
Definition wptr.h:17
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
@ s
The S key.