Skip to content

[Feature]: Check if annotations will not be better for systems definitions #777

Description

@mpusz

Problem Description

Several people on the ISO C++ Committee noted that annotations might offer better compilation times and a better user experience than the current template-based design.

Proposed Solution

Try annotations, assess compile-time performance, and evaluate user-friendliness.

🚀 Compiler Explorer Example (Optional)

No response

Alternatives Considered

No response

Feature Category

API Enhancement

Example Usage

Some rough ideas:

struct [[=unit::symbol("m"), =unit::kind(kind_of<isq::length>)]] metre;
struct [[=unit::symbol("Hz"), =unit::recipe(one / second), =unit::kind(kind_of<isq::frequency>)]] hertz;

or

struct [[=mp_units::unit("m", kind_of<isq::length>)]] metre;
struct [[=mp_units::unit("Hz", one / second, kind_of<isq::frequency>)]] hertz;

Priority

Nice to have

Implementation Ideas

No response

Additional Context

No response

Checklist

  • I have searched existing issues to avoid duplicates
  • I have read the project documentation
  • This feature aligns with the project's goals

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions