Skip to content

CPP implementation: does not reference a required separator character #443

Open

Description

@fulldecent

The C++ implementation states:

// Returns an Open Location Code with code_length significant digits. The string
// returned may be one character longer if it includes a separator character
// for formatting.

This is underspecified. Every plus code will have a separator character. CITATION NEEDED. Therefore a better wording would be to say:

// Returns an Open Location Code with code_length significant digits. The string
// returned will be one character longer because it includes a separator character
// for formatting.

Activity

  1. fulldecent commented on Apr 25, 2021

    @fulldecent
    ContributorAuthor

    Recommended tag: implementation

  2. fulldecent commented on May 24, 2024

    @fulldecent
    ContributorAuthor

    I realize this wording is CPP is based on a older and outdated understanding of OLC that used to be here. So this is issue should still be fixed.

  3. vinsymoyya commented on Nov 14, 2026

    @vinsymoyya

    Opened #769 to correct the C++ Encode API comment: the separator is always present after eight characters, and code lengths below eight significant digits are zero-padded to a nine-character string. The comment also explains how requested digit counts are normalized.

    Checked the documented behavior with a native C++ harness across all valid lengths and the normalization boundaries; the existing C++ suite passed 1,074 tests (excluding its benchmark). This is a documentation correction to existing behavior.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions