Avoid verbosity of compiler complains in case of incorrect type for Expected value (#4763)
Avoid verbosity of compiler complains in case of incorrect type for Expected value (#4763)

* Add static assert to check that value type in Expected is not a reference

* Avoid verbosity in compiler complains about wrong incorrect type for the value in Expected

to avoid much lines of compiler complains about incorrect usage of value type let's put static_asserts as close as we can to the types definition, before any usage.

jedi22/osquery,hackgnar/osquery,hackgnar/osquery,jedi22/osquery,jedi22/osquery,hackgnar/osquery