You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of requires in the can_cast_to function may not handle all cases correctly, especially if the type T cannot be constructed from source. This could lead to compilation errors or unexpected behavior.
The use of requires in the operator<< function could be improved for clarity. The lambda function inside any_check is complex and could be simplified or extracted into a named function for better readability.
std::ostream&operator<<(std::ostream&os, constDT&dt)
requires(is_dynamic_type_v<DT>&&any_check(
[](auto x) {
usingT=typenamedecltype(x)::type;
returnrequires(std::ostream&os, Tt) {
{
os << t
} ->std::same_as<std::ostream&>;
};
},
The DEFINE_ASSIGNMENT_OP macro could be simplified by removing the requires clause and using a more straightforward approach to check for the existence of the operator. This would make the code easier to understand and maintain.
#defineDEFINE_ASSIGNMENT_OP(op, assign_op) \
template <typename DT, typename T> \
requires is_dynamic_type_v<DT>&& requires(DT d, T t) { \
d op t; \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.