mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Force constness on ostream operator.
Automatically disable magic for variant types.
This commit is contained in:
parent
e26475e75b
commit
b0c74207d8
File diff suppressed because it is too large
Load Diff
|
@ -1308,7 +1308,13 @@ namespace sol {
|
|||
template <typename T>
|
||||
struct is_automagical
|
||||
: std::integral_constant<bool,
|
||||
std::is_array_v<meta::unqualified_t<T>> || !std::is_same_v<meta::unqualified_t<T>, state> || !std::is_same_v<meta::unqualified_t<T>, state_view>> {
|
||||
#if defined(SOL_CXX17_FEATURES) && SOL_CXX17_FEATURES
|
||||
#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT != 0
|
||||
!meta::is_specialization_of_v<meta::unqualified_t<T>, std::variant> &&
|
||||
#endif // std::variant borked in places
|
||||
#endif // C++17 Features
|
||||
std::is_array_v<
|
||||
meta::unqualified_t<T>> || (!std::is_same_v<meta::unqualified_t<T>, state> && !std::is_same_v<meta::unqualified_t<T>, state_view>)> {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -172,11 +172,11 @@ namespace sol {
|
|||
template <typename X>
|
||||
void set_undefined_methods_on(stack_reference t) {
|
||||
using T = std::remove_pointer_t<X>;
|
||||
|
||||
|
||||
lua_State* L = t.lua_state();
|
||||
|
||||
|
||||
t.push();
|
||||
|
||||
|
||||
detail::lua_reg_table l{};
|
||||
int index = 0;
|
||||
detail::indexed_insert insert_fx(l, index);
|
||||
|
@ -185,7 +185,7 @@ namespace sol {
|
|||
l[index] = luaL_Reg{ to_string(meta_function::garbage_collect).c_str(), detail::make_destructor<T>() };
|
||||
}
|
||||
luaL_setfuncs(L, l, 0);
|
||||
|
||||
|
||||
// __type table
|
||||
lua_createtable(L, 0, 2);
|
||||
const std::string& name = detail::demangle<T>();
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2019-11-29 18:08:19.653548 UTC
|
||||
// This header was generated with sol v3.0.3 (revision 21c0309)
|
||||
// Generated 2019-12-01 22:39:33.269777 UTC
|
||||
// This header was generated with sol v3.2.0 (revision e26475e)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user