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

Feature request: View-type for numbers #558

Open
liss-h opened this issue Jun 1, 2023 · 1 comment
Open

Feature request: View-type for numbers #558

liss-h opened this issue Jun 1, 2023 · 1 comment

Comments

@liss-h
Copy link

liss-h commented Jun 1, 2023

Hi there,
is there any plan to have a "view" type for numbers? (I.e. something like what std::string_view is to std::string)?

The usecase we had in mind would be a type "views" into the internals of a boost multiprecision number stored in some user defined backend storage, and is primarily used for the purpose of abstracting away the allocator on the backend-frontend interface boundary (like std::basic_string_view<char, char_traits> can do for std::basic_string<char, char_traits, alloc>). I know, that is potentially quite a niche usecase.

So, basically 3 questions:

  1. Like I asked on top: Is there already a plan to implement something like this?
  2. If there isn't any plan: Would you accept a contribution?
  3. If you do accept contributions: Do you foresee any major blockers that would prevent the implementation of that feature?
@mborland
Copy link
Member

mborland commented Jun 2, 2023

  1. Like I asked on top: Is there already a plan to implement something like this?

I am not aware of any plan for this feature.

  1. If there isn't any plan: Would you accept a contribution?

Contributions are always welcome.

  1. If you do accept contributions: Do you foresee any major blockers that would prevent the implementation of that feature?

The language standard is C++14, and if you use any boost features (e.g. Boost string_view) make sure that they can be contextually disabled with BOOST_MP_STANDALONE to keep the standalone mode functioning.

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

No branches or pull requests

2 participants