T
tthunder
Hi @all,
there are always details, why it isn't possible to create a consistent
framework
However, here some code:
//--------------
class foo
{
public:
foo(){}
};
class fooConst
{
public:
explicit fooConst(const foo &p_Foo){}
void doSomething() {}
};
void test()
{
fooConst myObject(foo());
myObject.doSomething(); // <--- Error
}
//--------------
This doen't work on all compilers I have tested, because "fooConst
myObject(foo());" is assumed to be a funtion declaration!
I know that I could write:
foo aFoo;
fooConst myObject(aFoo);
But I don't want to!
Is there another keyword, possibility,........ you can think of ???
Greetings,
Kirsten
there are always details, why it isn't possible to create a consistent
framework
However, here some code:
//--------------
class foo
{
public:
foo(){}
};
class fooConst
{
public:
explicit fooConst(const foo &p_Foo){}
void doSomething() {}
};
void test()
{
fooConst myObject(foo());
myObject.doSomething(); // <--- Error
}
//--------------
This doen't work on all compilers I have tested, because "fooConst
myObject(foo());" is assumed to be a funtion declaration!
I know that I could write:
foo aFoo;
fooConst myObject(aFoo);
But I don't want to!
Is there another keyword, possibility,........ you can think of ???
Greetings,
Kirsten