Giter VIP home page Giter VIP logo

Comments (21)

aster2013 avatar aster2013 commented on July 19, 2024

Which version of boost you used?

from kaguya.

satoren avatar satoren commented on July 19, 2024

I used 1.46(travis-ci), 1.56(appveyor) , 1.58(Ubuntu and cygwin), 1.60(Windows)
Maybe not enough on https://github.com/urho3d/Urho3D/tree/new-lua-script-test/Source/ThirdParty/boost

from kaguya.

satoren avatar satoren commented on July 19, 2024

I tried build on Ubuntu 12.04 with g++4.6. I encounter error too.

Error at kaguya/push_tuple.hpp:20:10: error: expected nested-name-specifier before ‘type’
but this line is in #if KAGUYA_USE_CPP11
g++4.6 is not supported C++11. Strange it. 😓

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

More arguments support in kaguya, current is 10, but I need 25.

from kaguya.

satoren avatar satoren commented on July 19, 2024

Realy? What to use it?

from kaguya.

satoren avatar satoren commented on July 19, 2024

added KAGUYA_FUNCTION_MAX_ARGS for more arguments support.
but overload function number is limited by boost::tuple. boost::tuple size is up to 10.

equal can not this.

    lua["Variant"].setClass(UserdataMetatable<Variant>()
        .setConstructors<Variant(),
        Variant(int),
        Variant(const StringHash&),
        Variant(bool),
        Variant(double),
        Variant(const Vector2&),
        Variant(const Vector3&),
        Variant(const Vector4&),
        Variant(const Quaternion&),
        Variant(const Color&),
        Variant(const char*),
        Variant(const ResourceRef&),
        Variant(const ResourceRefList&),
        Variant(const VariantVector&),
        Variant(const VariantMap&),
        Variant(const StringVector&),
        Variant(const IntRect&),
        Variant(const IntVector2&),
        Variant(RefCounted*),
        Variant(const Matrix3&),
        Variant(const Matrix3x4&),
        Variant(const Matrix4&)> ()

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

Thanks, I have solved it.

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

Please take a look here:

http://stackoverflow.com/questions/6425178/boost-tuple-increasing-maximum-number-of-elements

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

with boost::fusion I can build it on MinGW and Ubuntu.

from kaguya.

satoren avatar satoren commented on July 19, 2024

Added tuple by self implementation for overloads.

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

Thanks, I will check it later.

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

the new tuple self implementation will remain failed. please use boost::fusion::tuple.

from kaguya.

satoren avatar satoren commented on July 19, 2024

Did you changed only KAGUYA_FUNCTION_MAX_OVERLOADS?

KAGUYA_FUNCTION_MAX_TUPLE_SIZE does not affect the overloads,
and it can not over the 10 because it dependent on the boost::tuple.

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

Yes, I use following define:

#define KAGUYA_FUNCTION_MAX_ARGS 12
#define KAGUYA_FUNCTION_MAX_TUPLE_SIZE 24
#define KAGUYA_FUNCTION_MAX_OVERLOADS 9

but these is some bug in kaguya.
for example:

KAGUYA_PP_REPEAT_DEF(KAGUYA_FUNCTION_MAX_TUPLE_SIZE, KAGUYA_MULTIPLE_INHERITANCE_SETBASE_DEF)

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

You can check out Urho3D new-lua-script-test branch. It can build success with boost::fusion::tuple.
and then you can switch it to your implementation tuple for testing.
Thanks.

from kaguya.

satoren avatar satoren commented on July 19, 2024

KAGUYA_MULTIPLE_INHERITANCE_SETBASE_DEF is inheritance class implement. it is not affect overloads.

from kaguya.

satoren avatar satoren commented on July 19, 2024

build pass at MSVC 2015 with boost
and this options.

#define KAGUYA_USE_CPP11 0
#define KAGUYA_FUNCTION_MAX_ARGS 25
#define KAGUYA_FUNCTION_MAX_TUPLE_SIZE 9
#define KAGUYA_FUNCTION_MAX_OVERLOADS 25

from kaguya.

satoren avatar satoren commented on July 19, 2024

This is another bug but.

In clang++ , libstdc++ , -std=c++11
std::tuple is limited to 16. 😱

http://stackoverflow.com/questions/23374953/why-does-this-exceed-the-maximum-recursive-template-depth

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

Hi, these is another compiler error, pls. take a look.
https://travis-ci.org/urho3d/Urho3D/jobs/151133270

from kaguya.

aster2013 avatar aster2013 commented on July 19, 2024

with boost build time is too long up to 40 minutes.

from kaguya.

satoren avatar satoren commented on July 19, 2024

If KAGUYA_FUNCTION_MAX_OVERLOADS is defined, uses self tuple implementation including on C++11,
since 6ea947a

with boost build time is too long up to 40 minutes.

What environment? My environment is no difference.
https://travis-ci.org/satoren/kaguya/builds/151080943

from kaguya.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.