U
U.Mutlu
Three questions regarding type information:
1) Is it possible that a userfunction returns the type of an object
(instead of the object itself), so that it can be used in a declaration or definition?
Something like what typename(obj) does, but the factory should be a userfunc.
This would open up much advanced possibilities in the language.
2) Is it possible to declare/define a type from a string literal?
Ie. you have a const char* psz = "int" and want declare/define a variable
of that type that's in the string, ie. in this case int.
3) Is it possible to test a type that is in a string literal?
Ie. you have a const char* psz = "int" and want test if it is
a certain type, using typeid() etc.
1) Is it possible that a userfunction returns the type of an object
(instead of the object itself), so that it can be used in a declaration or definition?
Something like what typename(obj) does, but the factory should be a userfunc.
This would open up much advanced possibilities in the language.
2) Is it possible to declare/define a type from a string literal?
Ie. you have a const char* psz = "int" and want declare/define a variable
of that type that's in the string, ie. in this case int.
3) Is it possible to test a type that is in a string literal?
Ie. you have a const char* psz = "int" and want test if it is
a certain type, using typeid() etc.