Comments (3)
Sorry but no matter what you do muparserx cannot give you the type information
you need at compile time. Strictly spoken the return type of muparser is Value.
In most cases you can't process the value properly without first checking its
type. You could also get a string or a matrix as the return value (wrapped in a
Value). The return type is determined at runtime. Templates make their
distinction at compile time. I don't see how this will fit together very well.
A get function that is bound to fail at runtime when fed with the incorrect
type doesn't seem to be of much use either.
I'm leaving the issue open for the moment but i don't see this as a defect.
This is an inherent part of the design.
Original comment by [email protected]
on 14 Jul 2014 at 9:23
from muparserx.
In my case the return value is a specific type, otherwise it is an error, and
it would be convenient if e.g. a Get<int> would do all the error checking and
if ok return the value of .GetInteger() and throw otherwise, for example. It
would be even better if the parser knew what type I want to be returned from
the expression, and throw if the expression doesn't match, but I guess that
isn't supported.
Original comment by [email protected]
on 15 Jul 2014 at 1:46
from muparserx.
Closed since it's more of a feature request.
Original comment by [email protected]
on 23 Nov 2014 at 11:18
- Changed state: Invalid
from muparserx.
Related Issues (20)
- Tag for release 4.0.9 HOT 2
- Missing header HOT 1
- README says that the version is 4.0.9 but the last tag is 4.0.8 HOT 2
- how to switch rad or gra when use trigonometric function HOT 2
- Incorrect Assignment Multiplication HOT 1
- Inconsistent Use of Signedness for Binary and Hex Numbers
- Feature Request: Add an Octal Value Reader
- logic operator lack shor-circuit feature
- 4.0.10 FTBFS HOT 1
- constant starting with letter 'o' HOT 5
- Example fails on macOS HOT 7
- int to bool conversion HOT 3
- type checking HOT 1
- xor is listed in the documentation but not implemented HOT 3
- Is it possible to directly represent a matrix instead of using many lines to define it? HOT 4
- FunTan and FunSin error HOT 2
- Is matrix algebra in SetExpr possible? HOT 2
- fail at parsing boolean linear operation HOT 2
- [4.0.12] SEGFAULT in mupTokenReader
- Example couldn't be built on MINGW windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from muparserx.