GithubHelp home page GithubHelp logo

Comments (2)

ToruNiina avatar ToruNiina commented on May 28, 2024

I removed strerror that causes this problem because of its high maintenance-cost. So it should be fixed with the latest commit.
I will soon release patch v3.8.1 after CI passes (maybe a few hours later).


Background:

strerror is used only when you pass FILE* to toml::parse instead of std::string filename, std::filesystem::path, or std::istream.

There are multiple variants of strerror depending on the environment. The standard version is not thread-safe, so some compilers complain about it (already reported). To avoid this problem, we use environment-specific macros to detect which one is available. But I found that there are multiple environments/conditions where we cannot detect the available variant of strerror using de-facto macro (actually, we have just fixed the same kind of problem yesterday, before the release). There can be more envs where this does not work. The benefit of using strerror is not worth the cost.

I think the FILE* version is less used than other overloads (most of the users may not even know such an overload exists). And the impact is even smaller, since the change does not remove the ability to pass FILE*, but only to return an error number instead of a string if it fails. Still, one can search for the error number, or can get the errno from the exception and call the variant of strerror that is appropriate in the environment.

from toml11.

ToruNiina avatar ToruNiina commented on May 28, 2024

released.

from toml11.

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.