mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
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:
parent
350acbf254
commit
f355d27aea
@ -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 {
|
[[nodiscard]] constexpr const Boxed_Value &operator[](const std::size_t t_i) const noexcept {
|
||||||
return m_begin[t_i];
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user