Polygon enclosure vertex check should be a static assert

Open Beginner friendly
#154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Find the PolygonEnclosure class and its initialize() function, then inspect how the vertex count is defined and checked. Move the minimum-three-vertices constraint into a class-level static_assert; done means invalid vertex counts fail at compile time.

Written by the indexing model from the issue text.

Description

enhancement

The PolygonEnclosure::initialize() function checks that the number of vertices is at least 3. This is a constant known at compile-time. It should be turned into a static_assert in the class itself to prevent compilation if the class is used incorrectly.

Dominant language
C++
Stars
18
Forks
9
Avg merge
2h 56m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/cml

All issues in nasa/cml

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.