cpptoml icon indicating copy to clipboard operation
cpptoml copied to clipboard

g++-11 requires limits header

Open eddelbuettel opened this issue 5 years ago • 11 comments

The CRAN maintainers, who tend to be very proactive with new compiler builds, alerted me that my RcppROML package was failing builds under g++-11, and hinted that the change was a one-liner.

I have now confirmed this (in an Ubuntu 21.04 container with g++-11 from this launchpad repo. I will try to bundle this up in a new container too later in the week.

eddelbuettel avatar Nov 30 '20 15:11 eddelbuettel

The author's last update in github seems like a long time ago....

homalozoa avatar May 22 '21 10:05 homalozoa

Yes. There are at least three new C++ libraries (for C++11 or newer) offering full TOML 1.0 capabilities, but I haven't had time to dig in. If you have spare cycles and some C++ chops ...

eddelbuettel avatar May 22 '21 11:05 eddelbuettel

If you have spare cycles and some C++ chops ...

Yeah. What can I do for you? Can you share more details?

homalozoa avatar May 22 '21 14:05 homalozoa

You're Da Man!

So looking at e.g. the toml repo wiki we see three C++ projects that are v1.0.0 compliant. I have not really had to look into which is best. I have a mild preference for maybe just C++14 (supported at CRAN) but part of me also says 'eff it' as we have this one for fallback. In essence it is a matter of picking one (or more) of these and starting a new repo (borrowing liberally from this one and its existing R integration) and doing a new 'RcppTomlCpp' or 'RcppTomlPlusPlus' or 'RcppToml11'.

Interested? I help, I may not have to drive it myself but I found four eyes and hands can get a ton done...

(Sorry that was of course all from the context of my RcppTOML repo wrapping this, but being 'stale' as this is stale. For plain C++ use maybe just switch to any one of the three. I haven't yet for RcppTOML as it ... still works.)

eddelbuettel avatar May 22 '21 14:05 eddelbuettel

Got it!

I think https://github.com/marzer/tomlplusplus is the best of them. I think we should use modern C++ like C++ 11&14&17 even C++ 20. But I'm not familiar to R and your RcppTOML project. So please give me some time to read your code and docs before we start the new project. Another thing I'm quite not understand: Why not parse TOML directly with R, but using R-Cpp binding 'CppTOML' to parse TOML?

homalozoa avatar May 22 '21 15:05 homalozoa

Why not parse TOML directly with R

Easier to bind to an existing library that does it. Also faster. And tested. But hey, more than one way to skin the cat. (But if you look at R's existing parsers for JSON, XML, ... they all do it via external libs. It is the only way that makes sense, really.)

eddelbuettel avatar May 22 '21 15:05 eddelbuettel

Why not parse TOML directly with R

Easier to bind to an existing library that does it. Also faster. And tested. But hey, more than one way to skin the cat. (But if you look at R's existing parsers for JSON, XML, ... they all do it via external libs. It is the only way that makes sense, really.)

I see. Thanks.

You can start to create a new repo for the new lib now. Let get start it.

homalozoa avatar May 22 '21 15:05 homalozoa

Is there anyway to have this merged so I don't need to have a separate branch of this project?

smccauliff avatar Oct 15 '21 17:10 smccauliff

@skystrife I would also vote to bring that in. If you want you could maybe add an v0.1.2 for a bugfix release?

dkroenke avatar Feb 24 '22 15:02 dkroenke