GithubHelp home page GithubHelp logo

missing inline about crfsuite HOT 3 OPEN

chokkan avatar chokkan commented on July 22, 2024
missing inline

from crfsuite.

Comments (3)

chokkan avatar chokkan commented on July 22, 2024

Thank you for the comment.

The intention why I created two header files was that:

  1. "crfsuite_api.hpp" can be included multiple times where necessary, but "crfsuite.hpp" must be included only once
  2. "crfsuite.hpp" has a dependency to C API (crfsuite.h), whereas "crfsuite_api.hpp" has no external dependency (portable). If necessary, we can build a standalone pre-compiled C++ library (only with a single header file "crfsuite_api.hpp") that does not depend to the C header and library of libcrfsuite if necessary.

I should have named "crfsuite.hpp" as "crfsuite_impl.hpp" to clarify this role (and no mention about this role in the documentation :P )

At the same time, it is harmless to have "inline" to every member function in "crfsuite.hpp". I will commit the changes to the HEAD. BTW, I think "inline" should be "static inline" to achieve the goal.

from crfsuite.

chokkan avatar chokkan commented on July 22, 2024

My mistake: we cannot specify "static inline" in "crfsuite.hpp". I'm confused with the usage of "static" keyword inside and outside of a class.

from crfsuite.

unnonouno avatar unnonouno commented on July 22, 2024

I understood your intention. And, I correctly compiled my program with "crfsuite_api.hpp" and a cpp file that only includes "crfsuite.hpp".
I think the standalone C++ library is preferable. And, in this case, maybe "inline" is not necessary because I can't link inline methods defined in the object file. I think inline methods can't be referred from other object files.

I should have named "crfsuite.hpp" as "crfsuite_impl.hpp" to clarify this role (and no mention about this role in the documentation :P )

It's a good idea. The role of these files are clear.

from crfsuite.

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.