Skip to content

Commit

Permalink
Merge pull request #22 from ferkulat/compilation_fix
Browse files Browse the repository at this point in the history
Compilation fix
fixes #20
  • Loading branch information
ferkulat authored Dec 21, 2020
2 parents 0107d7b + 73fcd7f commit 833a146
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions csv2xlslib/conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <cstddef>
#include <ios>
#include <sstream>
#include <limits>

class BadNumericConversion : public std::out_of_range
{
Expand All @@ -43,9 +44,9 @@ TargetType ConvertTo(SourceType source)
{
return source;
}
else if constexpr (!std::is_convertible<SourceType, TargetType>::value)
else
{
static_assert("types are not convertible");
static_assert(std::is_convertible<SourceType, TargetType>::value, "types are not convertible");
}
if constexpr (std::is_signed<TargetType>::value ==
std::is_signed<SourceType>::value)
Expand Down

0 comments on commit 833a146

Please sign in to comment.