mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-08 01:36:54 +08:00
Warning / build fixes for gcc7
This commit is contained in:
parent
9bbe723827
commit
9596e15049
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user