Skip to content

docs: fix Cat constructor in README example - #45

Closed
thehanslevi wants to merge 1 commit into
gengyong:masterfrom
thehanslevi:codex/fix-readme-cat-constructor
Closed

thehanslevi wants to merge 1 commit into
gengyong:masterfrom
thehanslevi:codex/fix-readme-cat-constructor

Conversation

@thehanslevi

Copy link
Copy Markdown

Summary

  • Add the missing Cat(const std::string& name) declaration to the README quick-start example.
  • Keep the declaration aligned with luaCat.ctor<std::string>(), AwesomeCat.new("Bingo"), and the full example/example.cpp implementation.

Fixes #44.

Validation

  • rg -n "Cat\\(|ctor<std::string>|AwesomeCat\\.new|Cat\\(const std::string" README.md example/example.cpp example/example.lua
  • Compiler check: the current README-style declaration with only Cat() rejects Cat(std::string("Bingo")).
  • Compiler check: adding Cat(const std::string& name) accepts Cat(std::string("Bingo")).
  • git -c core.whitespace=cr-at-eol diff --check

I did not run the full Lua example build because Lua headers/libraries are not installed in my local environment.

@gengyong gengyong closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

readme typo

2 participants