cyberdstar / muparserx

Automatically exported from code.google.com/p/muparserx
Other
0 stars 0 forks source link

mup::Variable doesn't have a default constuctor #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This code doesn't compile: mup::Variable variable;

What is the expected output?

I'd expect the following code to work, which collects all objects related to 
parsing a specific expression together:
std::tuple<
    std::string,
    mup::ParserX,
    mup::Value,
    mup::Variable
> objects;

I don't see how I can initialize Variable in objects with a pointer to Value in 
objects without invoking a default constructor for Variable at some point.

What version of the product are you using?

3.0.1

Original issue reported on code.google.com by ilja.j.h...@nasa.gov on 16 Jul 2014 at 8:33

GoogleCodeExporter commented 9 years ago
I wanted to avoid having to deal uninitialized variables. In my mind an unbound 
variable just didn't make sense. Did you add a default constructor and it did 
solve your problem? If so i guess i can add it to the code. 

Original comment by ib...@gmx.info on 26 Jul 2014 at 1:57

GoogleCodeExporter commented 9 years ago
I solved the problem another way, but that led to other features (issue 40). 
I'm starting to think that it might be good to merge (at least from user point 
of view) the functionality of variable and value because they always seem to go 
together anyway.

Original comment by ilja.j.h...@nasa.gov on 26 Jul 2014 at 4:57