When using libc++ with GCC functions are not getting the explicit specifier as expected. This change adds a GCC check to resolve the problem.
I was unable to figure out exactly when GCC added support for the explicit keyword, but I found messages on the mailing list suggesting it was implemented and working in at lease GCC 3.3, so it just defaults to any GCC version.
A test case is included to reproduce the problem. While it could be demonstrated with any explicit function, this just happened to be the one we were having problem with.
Tested with GCC 5.4.0 and clang 3.8.0 using libc++ from ToT as well as GCC 5.4 using libc++ 3.7.1.
I think this test would be better making the bool conversion clear; instead of relying on the double conversion error_code --> bool --> int.