Warning / build fixes for gcc7

This commit is contained in:
Jason Turner 2017-08-24 18:35:03 -06:00
parent 9bbe723827
commit 9596e15049
2 changed files with 3 additions and 2 deletions

View File

@ -111,7 +111,7 @@ namespace chaiscript
/// Internal function for converting from a string to a value
/// uses ostream operator >> to perform the conversion
template<typename Input>
auto parse_string(const std::string &i)
Input parse_string(const std::string &i)
{
if constexpr (!std::is_same<Input, wchar_t>::value
&& !std::is_same<Input, char16_t>::value

View File

@ -59,6 +59,7 @@ namespace chaiscript
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wfloat-conversion"
#pragma GCC diagnostic ignored "-Wswitch"
#endif
/// \brief Represents any numeric type, generically. Used internally for generic operations between POD values
@ -80,7 +81,7 @@ namespace chaiscript
};
template<typename T>
constexpr static inline void check_divide_by_zero(T t)
constexpr static inline void check_divide_by_zero([[maybe_unused]] T t)
{
#ifndef CHAISCRIPT_NO_PROTECT_DIVIDEBYZERO
if constexpr (!std::is_floating_point<T>::value) {