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

  • SEARCH
  • Home
  • 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 7791573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:55:41+00:00 2026-06-01T21:55:41+00:00

Does anyone know of a library that allows you to do something like this?

  • 0

Does anyone know of a library that allows you to do something like this?

std::transform(vecA.begin(), vecA.end(), 
               vecB.begin(), 
               vecOutput.begin(), 
               // run-time specified expression 
               magic_functor<float>("exp(a/(b+3))") 
);

Where magic_functor is the library-provided functor and a and b are iterated through vecA and vecB.

I could come up with something myself (and would have a lot of fun doing so), but it’s probably better to avoid reinventing the wheel (also my boss would kill me). Have spent some time searching the web, but can’t really find anything that fits the bill.

It needs to be flexible and fast, so a functor approach that only parses the string once (e.g. creates an execution stack internally on construction) would be ideal, but am open to other solutions.

  • 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-01T21:55:43+00:00Added an answer on June 1, 2026 at 9:55 pm

    Several options (need some work and won’t work “out of the box”):

    • Write your own (Boost Spirit is your friend) parser (example)
    • MuParserX
    • Mathpresso
    • other libraries
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a good .NET library that allows me to parse source
Does anyone know of a library/component for Delphi that allows exporting graphics to a
Does anyone know of an open-source library that allows you to parse and read
Does anyone know of a Git library for C# that allows client code to
Does anyone know a C library that has some standard probability functions like R
Does anyone know of a library that would allow me to manipulate Flex DOM
Does anyone know of a library that works with Ruby 1.9.1 on Rails 3
Does anyone know of a library that enables you to run an application inside
Does anyone know of a Java library that provides support for the ${var} style
Does anyone know of a C# spell check library that would underline misspelled works

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.