Skip to content

Commit

Permalink
Fix #268 [BUG] Errors encountered during the build process with the C…
Browse files Browse the repository at this point in the history
…lang toolchain
  • Loading branch information
gammasoft71 committed Oct 29, 2024
1 parent 5088933 commit cf3156d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/xtd.core/include/xtd/any_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace xtd {
inline ptr<object> boxing_ptr(float& value) noexcept {return new_ptr<single_object>(value);}
inline ptr<object> boxing_ptr(double& value) noexcept {return new_ptr<double_object>(value);}
inline ptr<object> boxing_ptr(decimal& value) noexcept {return new_ptr<decimal_object>(value);}
inline ptr<object> boxing_ptr(nullptr_t value) noexcept {return ptr<object> {};}
inline ptr<object> boxing_ptr(std::nullptr_t value) noexcept {return ptr<object> {};}

ptr<object> value_;
};
Expand Down
2 changes: 1 addition & 1 deletion src/xtd.core/include/xtd/internal/__array_definition.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace xtd {
/// @par Examples
/// The following code example creates and initializes an Array and displays its properties and its elements.
/// @include array2.cpp
template<typename type_t = nullptr_t, xtd::size rank_size = 1, typename allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
template<typename type_t = std::nullptr_t, xtd::size rank_size = 1, typename allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
class array;

/// @brief Base object that represent array.
Expand Down
2 changes: 1 addition & 1 deletion src/xtd.forms/src/xtd/forms/application_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void application_context::main_form(const form& main_form) {
data_->main_form->form_closed += {*this, &application_context::on_main_form_closed};
}

void application_context::main_form(nullptr_t) {
void application_context::main_form(std::nullptr_t) {
if (data_->main_form != nullptr) data_->main_form->handle_destroyed -= {*this, &application_context::on_main_form_closed};
data_->main_form = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/xtd.forms/src/xtd/forms/panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ panel& panel::border_style(forms::border_style border_style) {
return *this;
}

panel& panel::border_style(nullptr_t) {
panel& panel::border_style(std::nullptr_t) {
if (data_->border_style) return *this;
data_->border_style.reset();
if (is_handle_created() && control_appearance() == forms::control_appearance::system) post_recreate_handle();
Expand Down
2 changes: 1 addition & 1 deletion src/xtd.forms/src/xtd/forms/picture_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ picture_box& picture_box::border_style(forms::border_style border_style) {
return *this;
}

picture_box& picture_box::border_style(nullptr_t) {
picture_box& picture_box::border_style(std::nullptr_t) {
if (data_->border_style) return *this;
data_->border_style.reset();
if (is_handle_created() && control_appearance() == forms::control_appearance::system) post_recreate_handle();
Expand Down
8 changes: 4 additions & 4 deletions src/xtd.tunit/include/xtd/tunit/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @exception xtd::tunit::assert_error If bad assertion.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::assert::is_not_null(nullptr); // test throws an assert_error exception.
Expand All @@ -1002,7 +1002,7 @@ namespace xtd {
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @exception xtd::tunit::assert_error If bad assertion.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::assert::is_not_null(nullptr, "User message..."); // test throws an assert_error exception.
Expand Down Expand Up @@ -1210,7 +1210,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @exception xtd::tunit::assert_error If bad assertion.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::assert::is_null(nullptr); // test ok.
Expand All @@ -1221,7 +1221,7 @@ namespace xtd {
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @exception xtd::tunit::assert_error If bad assertion.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::assert::is_null(nullptr, "User message..."); // test ok.
Expand Down
8 changes: 4 additions & 4 deletions src/xtd.tunit/include/xtd/tunit/assume.h
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ namespace xtd {
/// @brief Assumes that the pointer is not null.
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @exception xtd::tunit::abort_error If bad assertion.
/// @par Examples
/// ```cpp
Expand All @@ -1014,7 +1014,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @exception xtd::tunit::abort_error If bad assertion.
/// @par Examples
/// ```cpp
Expand Down Expand Up @@ -1230,7 +1230,7 @@ namespace xtd {
/// @brief Assumes that the pointer is null.
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @exception xtd::tunit::abort_error If bad assertion.
/// @par Examples
/// ```cpp
Expand All @@ -1241,7 +1241,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @exception xtd::tunit::abort_error If bad assertion.
/// @par Examples
/// ```cpp
Expand Down
8 changes: 4 additions & 4 deletions src/xtd.tunit/include/xtd/tunit/valid.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ namespace xtd {
/// @brief Validates that the pointer is not null.
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::valid::is_not_null(nullptr); // test fails.
Expand All @@ -958,7 +958,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::valid::is_not_null(nullptr, "User message..."); // test fails.
Expand Down Expand Up @@ -1161,7 +1161,7 @@ namespace xtd {
/// @brief Validates that the pointer is null.
/// @param pointer The pointer to check is null.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::valid::is_null(nullptr); // test ok.
Expand All @@ -1171,7 +1171,7 @@ namespace xtd {
/// @param pointer The pointer to check is null.
/// @param message A user message to display if the assertion fails. This message can be seen in the unit test results.
/// @param stack_frame Contains information about current file and current line.
/// @remarks Always false, a nullptr_t is always equal to nullptr.
/// @remarks Always false, a std::nullptr_t is always equal to nullptr.
/// @par Examples
/// ```cpp
/// xtd::tunit::valid::is_null(nullptr, "User message..."); // test ok.
Expand Down
8 changes: 4 additions & 4 deletions src/xtd.tunit/src/xtd/tunit/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,19 @@ void assert::is_not_empty(const wchar_t* value, const string& message, const sta
fail("collection not <empty>", "<empty>", message, stack_frame);
}

void assert::is_not_null(nullptr_t pointer, const stack_frame& stack_frame) {
void assert::is_not_null(std::nullptr_t pointer, const stack_frame& stack_frame) {
is_not_null(pointer, string::empty_string, stack_frame);
}

void assert::is_not_null(nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
void assert::is_not_null(std::nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
fail("not null", "null", message, stack_frame);
}

void assert::is_null(nullptr_t pointer, const stack_frame& stack_frame) {
void assert::is_null(std::nullptr_t pointer, const stack_frame& stack_frame) {
is_null(pointer, string::empty_string, stack_frame);
}

void assert::is_null(nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
void assert::is_null(std::nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
succeed(message, stack_frame);
}

Expand Down
8 changes: 4 additions & 4 deletions src/xtd.tunit/src/xtd/tunit/assume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,23 +502,23 @@ void assume::is_not_empty(const wchar_t* value, const string& message, const sta
}
}

void assume::is_not_null(nullptr_t pointer, const stack_frame& stack_frame) {
void assume::is_not_null(std::nullptr_t pointer, const stack_frame& stack_frame) {
is_not_null(pointer, string::empty_string, stack_frame);
}

void assume::is_not_null(nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
void assume::is_not_null(std::nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
try {
assert::is_not_null(pointer, message, stack_frame);
} catch (...) {
assert::abort();
}
}

void assume::is_null(nullptr_t pointer, const stack_frame& stack_frame) {
void assume::is_null(std::nullptr_t pointer, const stack_frame& stack_frame) {
is_null(pointer, string::empty_string, stack_frame);
}

void assume::is_null(nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
void assume::is_null(std::nullptr_t pointer, const string& message, const stack_frame& stack_frame) {
assert::succeed(message, stack_frame);
}

Expand Down

0 comments on commit cf3156d

Please sign in to comment.