cpp/thread/packaged task/valid

Checks whether has a shared state.

Parameters
(none)

Return value
if has a shared state,  otherwise.