You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There a template function value_or_default() is used to replace the ubiquitous design pattern of checking for the presence of a key in a std::map, and yielding its value if present or some default value if absent. This is a frequent and annoying pattern so would be nice to have a clean substitute. While it seems std::map hasn't inherited such a functionality yet in the language specification, std::optional sets a precedent with value_or().
Could make an attempt at a regular expression for check_syntax that could find all such instances. An LLM could likely recognise them but it's both an expensive sweep of the code base and would not protect against regression.
Activity