segregation icon indicating copy to clipboard operation
segregation copied to clipboard

Warnings when compiling on R 4.2 or lower

Open mfansler opened this issue 1 year ago • 2 comments

This package uses C++17 syntax, which is declared in the DESCRIPTION file. However, R does not use this information to control the C++ standard, but instead defaults to gnu++14 in R 4.2 and gnu++11 in R 4.1. This results in warnings about C++17 extensions during installation (e.g., see recent CRAN install log1).

These warnings could be avoided by explicitly setting CXX_STD=CXX17 in Makevars(.win) files.

This is just a minor suggestion (nothing urgent).


[1]: Unfortunately, this is not a persistent log. Specifically, there are two warning: decomposition declarations are a C++17 extension resulting from compiling compression.cpp with -std=gnu++14.

mfansler avatar Dec 04 '23 00:12 mfansler

Hi! Would a Makevars file in the src directory solve this? Or do I need a Makevars.win file as well?

elbersb avatar Jan 30 '24 21:01 elbersb

Not sure if windows will use the generic one, so might need both.

mfansler avatar Jan 30 '24 23:01 mfansler