Thread: manage system::errc as it was an real enum class, so no implicitly convertible to an int.

[SVN r86544]