8000 operator""_z returns unsigned and is in the global scope · Issue #868 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
operator""_z returns unsigned and is in the global scope #868
Closed
@BenFrantzDale

Description

@BenFrantzDale

At

constexpr std::size_t operator""_z(unsigned long long n) { return n; }
it defines constexpr std::size_t operator""_z(unsigned long long n) { return n; }.

  1. This is inconsistent with C++23's (P0330R8)[https://wg21.link/P0330R8] operator""z, which returns std::make_signed_t<std::size_t>.
  2. This is presumptuous to put this in the global scope; it should go in namespace manifold (and possibly also in something like namespace manifold::literals).

Proposed solution:
Rename to operator""_uz and move into namespace manifold.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0