Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement array reference with any #4096

Merged

Conversation

lisitsyn
Copy link
Member

No description provided.

{
return true;
}
return std::equal(*(m_ptr), *(m_ptr) + *(m_length), *(other.m_ptr));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be specialized for floats I guess?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact need to check whether the elements support ".equals" or "->equals"

}
return std::equal(
*(m_ptr), *(m_ptr) + *(m_length), *(other.m_ptr),
[](T lhs, T rhs) -> bool { return any_detail::compare(lhs, rhs); });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty cool!

Copy link
Member

@karlnapf karlnapf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test lgtm

@lisitsyn lisitsyn merged commit 2b3a863 into shogun-toolbox:develop Jan 21, 2018
vinx13 pushed a commit to vinx13/shogun that referenced this pull request Jan 28, 2018
karlnapf pushed a commit to karlnapf/shogun that referenced this pull request Feb 4, 2018
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants