openframeworks / openframeworks/openFrameworks

'expected expression' in parameter.h file

Open
#5,372 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-feedback
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I'm trying to run the examples in this addon: https://github.com/patriciogonzalezvivo/ofxVoro

when I do so I am getting two error messages indication "expected expression" in parameter.h

Specifically at line 356 and 363.

template <typename T>
struct has_loading_support {
	static istream & stream;
	static T & x;
	static const bool value = sizeof(check(stream >> x)) == sizeof(yes);
};                                                                                         **^ expected expression

template <typename T>
struct has_saving_support {
	static ostream & stream;
	static T & x;
	static const bool value = sizeof(check(stream << x)) == sizeof(yes);
};                                                                                          **^expected expression

this error showed up with someone else addon, but I don't know how to use their solution:

https://forum.openframeworks.cc/t/compilation-errors-in-ofparameter-h/22708
Is there a problem with parameter.h?

So far I have updated to of 0.9.8, used the project generator to create a blank project with ofxVoro as an addon, copied the src files from the example (flock and tissue) and the same error results.

(update: this forum question mentions it was fixed, but I just got it...? https://forum.openframeworks.cc/t/ofparameter-h-compile-error/21222 )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with parameter.h at lines 356 and 363 and reproduce the errors by running the ofxVoro flock or tissue examples in a blank project created with the project generator. Compare the reported forum fixes and verify that the examples compile successfully with openFrameworks 0.9.8.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.