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

Made scan a new format callable #2062

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Made scan a new format callable #2062

wants to merge 11 commits into from

Conversation

SadiinsoSnowfall
Copy link
Collaborator

No description provided.

@SadiinsoSnowfall SadiinsoSnowfall marked this pull request as draft February 6, 2025 13:51
@SadiinsoSnowfall
Copy link
Collaborator Author

I need some help with the documentation on this one

@SadiinsoSnowfall SadiinsoSnowfall marked this pull request as ready for review February 10, 2025 15:12
include/eve/concept/substitute.hpp Outdated Show resolved Hide resolved
include/eve/module/core/regular/scan.hpp Outdated Show resolved Hide resolved
include/eve/module/core/regular/scan.hpp Outdated Show resolved Hide resolved
include/eve/module/core/regular/scan.hpp Outdated Show resolved Hide resolved
//! @groupheader{Examples}
//! - `eve::one`
//! - `eve::one_t`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I undrestand where you coming from but this is not a helpful doc.

eve::one is what people should be using. one_t is almost never used.

@jfalcou help me here.

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, I asked @SadiinsoSnowfall to change it as technically the concept works on type not value.
We can change it back no problem.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated the documentation, let me know

//! `eve::as_value` on a value of the first type.
//================================================================================================
template<typename S, typename Target>
concept substitute_for = generator_for<S, Target> || ((arithmetic_value<S> || relaxed_logical_value<S>) && requires(S s) { Target{s}; });
Copy link
Collaborator

Choose a reason for hiding this comment

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

requires(S s) { Target{s}; }

That's constructible. I'm not sure if we want convertible or constructible though.

Why arithmetic || relaxed logical? That is value, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

value doesn't include bool and we don't have(/want?) relaxed_value. I guess I could do value<S> || std::same_as<S, bool>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should be fixed

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.

3 participants