Fix GCC build error "explicit specialization in non-namespace scope"

- other compilers don't complain, but for GCC needed to move the
  template constructor specialization (array of size 0) outside the
  class declaration.
This commit is contained in:
Glen Fraser 2020-09-04 13:52:25 +02:00
parent 350acbf254
commit f355d27aea

View File

@ -40,12 +40,6 @@ namespace chaiscript {
{
}
template<>
constexpr explicit Function_Params(const std::array<Boxed_Value, size_t{0}> &a)
: m_begin(nullptr), m_end(nullptr)
{
}
[[nodiscard]] constexpr const Boxed_Value &operator[](const std::size_t t_i) const noexcept {
return m_begin[t_i];
}
@ -80,6 +74,13 @@ namespace chaiscript {
};
// Constructor specialization for array of size 0
template<>
constexpr Function_Params::Function_Params(const std::array<Boxed_Value, size_t{0}> &a)
: m_begin(nullptr), m_end(nullptr)
{
}
}