New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimum compilation standard C++11 or C++14 needed with g++-11
#68
Comments
Just made a local branch and renamed all instances of It's not that involved, though, but actually the files I am ready to make the PR if we decide to change the qualifier Also sorry for being absent, I will come back to this project asap, there were some other urgent things and the weeks went by in a flash... |
No strong feelings either way. The PR is more work but now that you have done it we may as well use it. Though The real way to fix it, of course, is to not use |
Personally, I weakly favour changing a variable name over imposing otherwise unnecessary restrictions on compiler versions given the potential for future headaches. Thanks, @ilyaZar, for having the energy to actually do something. No need to apologise for being busy, I'm sure we've all had similar issues and I know I haven't managed to do anything related to this project recently -- it would certainly be good get things tidied up if we can find some time between us. |
(Just a nit on wording: we do not "impose restrictions" on compilers; we defend ourselves against our own sloppyness by asking newer compilers to use C++11 or C++14. Which may all be my fault as we IIRC once had But it's all a mountain/molehill problem. Any fix will do. |
Fair point. Still, asking for a specific compiler standard to address a detail like this didn't seem to be an optimal solution. I agree that |
Thanks Dirk for bringing this up and Ilya for making the change. I'm happy with any fix! |
Valid points, @conradsnicta, but parts of me still thinks that beyond the (current) "band aid" of adjusting / constraining the C++ dialect we should ultimately do the deeper work of compiling with any standard and drop the 'not-really-recommended-in-a-library' practice of |
Turns out that by simply removing |
Nice. Well spotted. |
Thanks @eddelbuettel ! Just did the same fix as you but enforced C++ 17 via Output:
|
There are different ways to skin this cat, but my weak overall preference is to not constrain and not set a standard unless we have to. Setting |
g++
version 11 defaults to C++17 as a compilation standard. And C++17 introducesstd::data()
which clashes withrcppsmc/inst/include/LinReg.h
Lines 33 to 39 in ff4d2c6
and similarly in
LinReg_LA.h
andLinReg_LA_adapt.h
. The simplest fix is to just (re- ?) introduceCXX_STD=CXX11
(or equallyCXX14
) insrc/Makevars
andsrc/Makevars.win
.I can this in a simple commit assuming that is ok with everybody. We could also rename our
data
todata_
or something else but that may be more involved. Thoughts?The text was updated successfully, but these errors were encountered: