Skip to content

Commit

Permalink
Fix similar bug with signed get_impl and double.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Geigle committed Oct 15, 2016
1 parent 048ce87 commit b0a6ac4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/cpptoml.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,9 @@ inline std::shared_ptr<table_array> make_element<table_array>()
// where special casting behavior (like bounds checking) is desired

template <class T>
typename std::enable_if<std::is_signed<T>::value, option<T>>::type
typename std::enable_if<!std::is_floating_point<T>::value
&& std::is_signed<T>::value,
option<T>>::type
get_impl(const std::shared_ptr<base>& elem)
{
if (auto v = elem->as<int64_t>())
Expand Down

0 comments on commit b0a6ac4

Please sign in to comment.