Hi Petr,
Is it possible to have static functions in the classes with CALITKO_TESTABLE marker? I haven’t studied it deeply (so it might be only my mistake) but when I had a static function in the TrackerRequestSession I got the following error during compilation:
That’s fixed already in the main branch.
I think I would never have created a private static function but thanks to you I got an insight when I should :-). It’s the semantics that const and static communicate. A const function would not modify the state of the object but would need access to the members, whereas a static function doesn’t need to access the member variables, so it is essentially a kind of “generic” helper - a function that could just as well be declared static in the cpp file.
Looking at private const functions in Uri, I think that the functions doEncode, shouldEncode, hex, quoted, doDecode, fromHex, unqoted, ensureNotNull all better be static rather then const! What do you think?
Regards,
Peter
