Hi,
In C++98/C++03, there are no pure/const function keywords in the language.
Has this changed in C++0x?
If so, is it possible to set such a flag even on function objects (
std::function
)? So I can pass some function pointer or lambda functions and additional give the information that it is a pure/const function? The called function may have an optimized execution path for such a function.Is there some way to check if a given function is pure/const? I.e. for example, if there is such flag on
std::function
as described above, I probably could just check that flag. But maybe there is even a more general way.
If it has not changed, why not? I think it might be quite useful to have such a support.
Are there any open proposals about it?