Open
Description
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.

By the way, special thanks for the book and the author! It is very helpful!
Metadata
Metadata
Assignees
Labels
No labels