I am searching for some help in next situation:
I have some class and some method in it, syntax is like this:
class SomeClass {
public:
void doSomething(int *a);
};
So I want to call this method like
SomeClass::doSomething({ 0, 1, 2, 3, 4 });
Is it possible in any language? Any (C++, C, obj-c, obj-c++) implementation is welcome! I know that this initialization block is a body of array, like
int *a = { 0, 1, 2, 3, 4 };
SomeClass::doSomething(a);
But interface will look great, I think, if there will be no temp variables before function calls (as we don't need to know the type of parameter in class-client). So, is there any chance to make this?