Skip to content

Guidance for enforcement of minimum CXX_STANDARD_VERSION in libraries. #187

@JeffGarland

Description

@JeffGarland

The beman standard doesn't have a writeup of how to ensure the minimum C++ version in compiles. From a brief check, we're actually pretty good and consistent about NOT putting this into cmakelist.txt files. But I'd like to burn that approach into the standard and remove checking from cmake if we have it anywhere. The rationale is simply that especially for header only someone might lift out the header and use it outside of our cmake -- so enforcement must be done at the C++ code level. If a library wants to check and give a nice error message, I believe this is how it should be done:

https://discourse.bemanproject.org/t/why-not-share-more-files-via-infra-submodule/536/3?u=jeff-garland

So my proposal here will be to 1) update the standard, 2) update exemplar with an example.

Before making this change I'd like to get consensus of course. @nickelpro @ednolan @inbal2l @camio thoughts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions