I saw a paper somewhere about C++ supporting implicit-callable functions, however compilers like GCC report a warning/error about functions being called implicitly. I think the paper pertained to C++0x, but if that's the case, Wikipedia's article on C++0x as well as GCC's C++0x roadmap don't mention this. I'd like to use this as a substitute for property get/set functionality.
EDIT: http://www-cdserver.fnal.gov/cd_publ...alks/N1611.pdf
I ask if implicit functions are usable in C++ at this time and... well, I use GCC, so... if so, does GCC support them?
Another element that's crossed my mind is if C++ or C support subrange types. Less-used languages such as Pascal or Ada support this and I was wondering if C does too.
Example of an ICF from what I've read about (C++)
Example of a subrange type, for reference (Pascal)Code:class Test { public: int testvar() implicit {return m_testvar;}; // can be used as getting m_testvar and setting m_testvar, without parentheses, (ie. testvar = 9) private: int m_testvar; };
Code:type TSubrangeType = 1..10; // only allows a variable of this type to use values between 1 and 10 as well as 1 and 10 themselves, nothing else