Skip to content

GCC 6 Support #4

Closed
Closed

Description

@RobLoach

When using GCC 6, there's a cast error in the math module...

math.hpp: In instantiation of ‘chaiscript::ModulePtr chaiscript::extras::math::isinf(chaiscript::ModulePtr) [with Ret = bool; Param = double; chaiscript::ModulePtr = std::shared_ptr<chaiscript::Module>]’:
math.hpp:765:30:   required from here
math.hpp:443:31: error: invalid static_cast from type ‘<unresolved overloaded function type>’ to type ‘bool (*)(double)’
        m->add(chaiscript::fun(static_cast<Ret (*)(Param)>(&std::isinf)), "isinf");
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
math.hpp: In instantiation of ‘chaiscript::ModulePtr chaiscript::extras::math::isnan(chaiscript::ModulePtr) [with Ret = bool; Param = double; chaiscript::ModulePtr = std::shared_ptr<chaiscript::Module>]’:
math.hpp:769:30:   required from here
math.hpp:450:31: error: invalid static_cast from type ‘<unresolved overloaded function type>’ to type ‘bool (*)(double)’
        m->add(chaiscript::fun(static_cast<Ret (*)(Param)>(&std::isnan)), "isnan");
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Activity

  1. lefticus commented on Dec 1, 2017

    @lefticus
    Member

    I'm unable to reproduce this, but I believe that this should fix the issue without having to disable the functions altogether.

    Can you test this version and see if it is fixed for you?

  2. RobLoach commented on Dec 1, 2017

    @RobLoach
    ContributorAuthor

    Confirmed that it fixes the Math issue! Getting string_id failures because I didn't install the biicode dependencies, but that's my problem. Nicely done! 👍

    Clever fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions