Skip to content

Instantly share code, notes, and snippets.

@LB--
Created April 21, 2013 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LB--/5428290 to your computer and use it in GitHub Desktop.
Save LB--/5428290 to your computer and use it in GitHub Desktop.
This doesn't work like I wanted it to, but it's too cool to just delete.
template<typename T>
operator typename std::enable_if<std::is_arithmetic<T>::value && !std::is_floating_point<T>::value && !std::is_same<T, bool>::value, T>::type() const noexcept
{
return static_cast<T>(static_cast<json_int_t>(value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment