Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG with code missing ;] Small coding error missing ';' #302

Open
mumupika opened this issue Feb 20, 2025 · 0 comments
Open

[BUG with code missing ;] Small coding error missing ';' #302

mumupika opened this issue Feb 20, 2025 · 0 comments

Comments

@mumupika
Copy link

mumupika commented Feb 20, 2025

Actual Description

  • File Path:book/en-us/02-usability.md
  • Original paragraph: Non-type template parameter deduction
A copy of the original paragraph
template <typename T, int BufSize>
class buffer_t {
public:
    T& alloc();
    void free(T& item);
private:
    T data[BufSize];
}

buffer_t<int, 100> buf; // 100 as template parameter

Expected Description

A modified paragraph
template <typename T, int BufSize>
class buffer_t {
public:
    T& alloc();
    void free(T& item);
private:
    T data[BufSize];
};    // small ; was missing!

buffer_t<int, 100> buf; // 100 as template parameter

Attachments

Attach screenshot or files if necessary.

Image

By the way, special thanks for the book and the author! It is very helpful!

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

No branches or pull requests

1 participant