Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9138223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:13:43+00:00 2026-06-17T09:13:43+00:00

I am looking for a static-sized std::valarray implementation. It should be easy to implement

  • 0

I am looking for a static-sized std::valarray implementation.

It should be easy to implement it by myself, but I need constexpr operations (sum,subtraction, etc.) and that is kinda boring/error prone to do, so I ask here if there is a popular implementation out there.

If I have to implement this by myself, do you think that expression-templates are worth in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:13:43+00:00Added an answer on June 17, 2026 at 9:13 am

    What about array of C++11?

    But you have to implement the arithmetics yourself. Is that error-prone? I don’t think so. Boring, maybe. And what about goo’ ol’ valarray from C++99? There you have your arithmetics, already — but, alas, they are not constexpr.

    But you can take its implementation, wrap it around a simple array specialization and and you have a less error-prone, exciting task 😉

    I myself would love to try it with expression templates. But it depends how quick you have to get the code on the road. Its probably difficult to do at first, but easier to maintain (for yourself and other template magicians) in the long run. And more fun.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking at Static variables in JavaScript and I noticed something I'd seen
Looking at different options: One is to just put the static pages in the
We're looking at removing all of the static resources (mainly images) in our ASP.NET
I'm looking for a parser that can extract methods from a java class (static
I have this small class looking like this: private static int field1 = -
I'm looking for an equivalent of PerlCritic for PHP. PerlCritc is a static source
I am looking for a way for overlapping a table on another, but with
While looking at the Linux kernel, I noticed the line: static void *malloc(size_t size)
Still the newbie in Scala and I'm now looking for a way to implement
I'm looking at the kauth tech note , but this isn't about that specifically.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.