Skip to content

Add C++ deduction guides and static asserts #111

Description

@adamfowleruk

[Who] As a C++ app developer
[What] I need to see sensible error messages when I mis-use a Herald API template class
[Value] In order to not be baffled by default C++ template error messages, and to speed the development of my app

Describe the potential solution you'd like

  • Deduction guides to minimise typing of types (so template classes can be used without angled braces)
  • static_asserts to point out when I'm mis-using a template class

Describe alternatives you've considered

Considered concepts instead of static asserts, but that's a C++20 feature, and embedded C++ layers don't yet support these well.

Additional context

See test classes using all of the sensor, analysis, exposure, and risk APIs to see how complex angled bracket parameters are getting. Also the amount of time taken debugging v2.1 due to a lack of helpful template error messages.

Relative priority

Medium, required before this version is released.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions