11#define __XTD_CORE_INTERNAL__
14#undef __XTD_CORE_INTERNAL__
16#define __XTD_CORE_INTERNAL__
38#undef __XTD_CORE_INTERNAL__
41#define __XTD_CORE_INTERNAL__
43#undef __XTD_CORE_INTERNAL__
45#define __XTD_CORE_INTERNAL__
47#undef __XTD_CORE_INTERNAL__
50#define __XTD_CORE_INTERNAL__
52#undef __XTD_CORE_INTERNAL__
55template<
typename new_type,
typename current_type>
56[[nodiscard]]
auto __convert_value__(current_type* value) -> new_type* {
60template<
typename result_t,
typename source_t>
62 auto result = __opaque_xtd_linq_enumerable_collection__<result_t> {};
63 result = __opaque_xtd_linq_enumerable_collection__<result_t> {};
64 for (
const auto& item : source)
69template<
typename type_t>
70template<
typename target_t>
76template<
typename type_t>
77template<
typename target_t>
83template<
typename type_t>
84template<
typename target_t>
85[[nodiscard]]
auto xtd::shared_ptr_object<type_t>::to_object() const -> target_t {
90template<
typename type_t>
91template<
typename target_t>
92[[nodiscard]]
auto xtd::shared_ptr_object<type_t>::to_pointer() const -> target_t* {
93 if (to_pointer() == null)
return null;
97template<
typename type_t,
typename deleter_t>
98template<
typename target_t>
99[[nodiscard]]
auto xtd::unique_ptr_object<type_t, deleter_t>::to_object() const -> target_t {
104template<
typename type_t,
typename deleter_t>
105template<
typename target_t>
106[[nodiscard]]
auto xtd::unique_ptr_object<type_t, deleter_t>::to_pointer() const -> target_t* {
107 if (to_pointer() == null)
return null;
111template<
typename source_type_t, xtd::usize source_rank,
typename source_allocator_t,
typename destination_type_t, xtd::usize destination_rank,
typename destination_allocator_t>
112inline auto xtd::array<>::copy(
const array<source_type_t, source_rank, source_allocator_t>& source_array,
xtd::usize source_index,
const array<destination_type_t, destination_rank, destination_allocator_t>& destination_array,
xtd::usize destination_index,
xtd::usize length) ->
void {
114 for (
auto r =
xtd::usize {};
r < source_array.rank(); ++
r)
120 destination_array.data_->items[destination_index + i] = as<destination_type_t>(source_array.data_->items[source_index + i]);
124 template<
typename type_t,
typename ...args_t>
125 [[nodiscard]]
inline auto as(
const std::variant<args_t...>& value) -> type_t {
127 return std::get<type_t>(value);
130 template<
typename type_t,
typename ...args_t>
131 [[nodiscard]]
inline auto as(std::variant<args_t...>& value) -> type_t {
133 return std::get<type_t>(value);
138 template<
typename type_t>
140 template<
typename type_t>
Contains xtd::any type and std::bad_any_cast exception.
Contains xtd::any_object class.
static auto copy(const array< source_type_t, source_rank, source_allocator_t > &source_array, const array< destination_type_t, destination_rank, destination_allocator_t > &destination_array) -> void
Copies a range of elements from an xtd::array starting at the first element and pastes them into anot...
Definition array_static.hpp:239
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:40
static auto throws(xtd::helpers::exception_case exception_case, const source_location &location=source_location::current()) -> void
Throws an exption with specified exception case.
static auto cast(const ienumerable< source_t > &source) noexcept
Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
auto to_reference() const -> type &
Gets the stored reference.
Definition reference_wrapper_object.hpp:238
auto to_object() const -> type_t &
Gets the stored object.
Definition reference_wrapper_object.hpp:228
Contains xtd::convert class.
Contains xtd::convert class.
Contains xtd::convert_string class.
Contains xtd::enum_object struct.
constexpr xtd::expressions::placeholder< index > arg
The xtd::expressions::arg instance is the index argument used by expression.
Definition arg.hpp:61
@ value
Represnets the constant operator precedence (42).
Definition operator_precedence.hpp:30
@ argument
The argument is not valid.
Definition exception_case.hpp:31
@ invalid_cast
The cast is not valid.
Definition exception_case.hpp:63
@ rank
The rank is not valid.
Definition exception_case.hpp:93
@ argument_out_of_range
The argument is out of range.
Definition exception_case.hpp:35
@ null_pointer
The pointer is null.
Definition exception_case.hpp:79
null_ptr null
Represents a null pointer value.
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
auto any_cast(const xtd::any &operand) -> type_t
Performs type-safe access to the contained object.
Definition any_cast.hpp:22
auto as(any_object &o) -> type_t
Casts a type into another type.
Definition __as_any_object.hpp:60
@ r
The R key.
Definition console_key.hpp:122
@ i
The I key.
Definition console_key.hpp:104
Contains xtd::invalid_cast_exception exception.
Contains xtd::linq::enumerable <type_t> class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto length() const noexcept -> size_type
Returns the length of the current read_only_span.
Definition read_only_span.hpp:213
constexpr auto is_empty() const noexcept -> bool
Returns a value that indicates whether the current xtd::read_only_span <type_t> is empty.
Definition read_only_span.hpp:209
Contains xtd::reference_wrapper_object class.
Contains xtd::shared_ptr_object class.
Contains xtd fundamental types.