Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Function.h: "expression cannot be used as a function"
Re: Function.h: "expression cannot be used as a function" [message #49379 is a reply to message #49378] Thu, 01 February 2018 11:16 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1093
Registered: August 2007
Senior Contributor
Hello Giorgio,

Quote:

This is not clear to me: Gate is in Function.h (Core library of U++).


Because compiler is tracing back the error to its source. Event/Gate/Function are templates. Event and Gate are aliases for specialized Function templates. Basically, compiler has to go back to their declarations (in function.h) to inform you that it cannot instantiate them with the parameters you provided.

As Novo pointed out, there is probably an ill-defined Event/Gate/Function (or CALLBACK) in your code. Check your callbacks and verify their signatures (i.e., if they are taking correct parameters, returning the expected value types or just void.)

First check:
	btnTrova <<= THISBACK1(ScanCommessa, macchina);
	listaMetri <<= THISBACK(CambioPezzatura);


Are these callbacks defined correctly?
Then check other callbacks. E.g. look into StatusDetector.h, AggiungiComm.h (if you defined some callback there).

Best regards,
Oblivion


[Updated on: Thu, 01 February 2018 11:51]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I've been using FindFile wrong all these years
Next Topic: Vector<T>::Set(int i, T&& x) proposal
Goto Forum:
  


Current Time: Tue May 07 16:01:38 CEST 2024

Total time taken to generate the page: 0.02434 seconds