is_stringable trait

This commit is contained in:
ThePhD 2017-09-28 19:07:33 -04:00
parent e31ed4f81c
commit 5c9e8e2e45
10 changed files with 19 additions and 6 deletions

View File

@ -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 2017-09-24 20:50:41.761192 UTC
// This header was generated with sol v2.18.4 (revision 2eb53ac)
// Generated 2017-09-28 23:07:20.129208 UTC
// This header was generated with sol v2.18.4 (revision e31ed4f)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP
@ -5144,6 +5144,9 @@ namespace sol {
template <typename T>
struct is_container : detail::is_container<T> {};
template <typename T>
struct is_to_stringable : meta::any<meta::supports_to_string_member<meta::unqualified_t<T>>, meta::supports_adl_to_string<meta::unqualified_t<T>>, meta::supports_ostream_op<meta::unqualified_t<T>>> {};
namespace detail {
template <typename T, typename = void>
struct lua_type_of : std::integral_constant<type, type::userdata> {};
@ -15722,7 +15725,7 @@ namespace sol {
usertype_detail::make_length_op<T>(l, index);
}
if (fx(meta_function::to_string)) {
usertype_detail::make_to_string_op<T, meta::any<meta::supports_to_string_member<T>, meta::supports_adl_to_string<T>, meta::supports_ostream_op<T>>>(l, index);
usertype_detail::make_to_string_op<T, is_to_stringable<T>>(l, index);
}
if (fx(meta_function::call_function)) {
usertype_detail::make_call_op<T>(l, index);

View File

@ -805,6 +805,9 @@ namespace sol {
template <typename T>
struct is_container : detail::is_container<T> {};
template <typename T>
struct is_to_stringable : meta::any<meta::supports_to_string_member<meta::unqualified_t<T>>, meta::supports_adl_to_string<meta::unqualified_t<T>>, meta::supports_ostream_op<meta::unqualified_t<T>>> {};
namespace detail {
template <typename T, typename = void>
struct lua_type_of : std::integral_constant<type, type::userdata> {};

View File

@ -202,7 +202,7 @@ namespace sol {
usertype_detail::make_length_op<T>(l, index);
}
if (fx(meta_function::to_string)) {
usertype_detail::make_to_string_op<T, meta::any<meta::supports_to_string_member<T>, meta::supports_adl_to_string<T>, meta::supports_ostream_op<T>>>(l, index);
usertype_detail::make_to_string_op<T, is_to_stringable<T>>(l, index);
}
if (fx(meta_function::call_function)) {
usertype_detail::make_call_op<T>(l, index);

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>
#include <catch.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>
#include <catch.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>
#include <catch.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>

View File

@ -1,4 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1
#include <sol.hpp>
#include <catch.hpp>