sundials icon indicating copy to clipboard operation
sundials copied to clipboard

Avoid use of reserved names.

Open bangerth opened this issue 3 years ago • 2 comments

The page at https://github.com/LLNL/sundials/blob/develop/doc/shared/sundials/SUNContext.rst describes the Context structure as declared as follows:

struct _SUNContext *SUNContext

This is unfortunate: Both C and C++ reserve all names that (i) start with an underscore, followed by an uppercase letter, (ii) start with two underscores. See https://en.cppreference.com/w/cpp/language/identifiers .

I haven't checked whether that's the only name in SUNDIALS that has this problem, or whether that's a pattern. Either way, it's probably worth avoiding the issue, and because these names aren't part of the public interface, it shouldn't even be that difficult to rename things if you so chose.

bangerth avatar Feb 23 '22 03:02 bangerth

Unfortunately, SUNDIALS has used a leading underscore followed by an uppercase letter from the beginning so it is not limited to just _SUNContext. We can work towards changing these when they are not part of the public interface for now, and then look into fixing the others when a major release is on the horizon.

balos1 avatar Feb 28 '22 17:02 balos1