Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by mgaunard

3 days ago

In C++, you define the semantics yourself.

2 comments

mgaunard

Reply

wtetzner  3 days ago

No, const semantics are defined by the language definition.

  • mgaunard  1 day ago

    It's defined by whatever you put in your const overloads.

    const is primarily a type annotation that affects overload resolution.

    You must be confused because Rust has no overloading to begin with.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities