Fix Template Specialization Index CodeBlock for const in printData (#4446)

pull/4408/head^2
Andret Carpizo 1 year ago committed by GitHub
parent 8ca9f976cd
commit 8903f11f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/data/roadmaps/cpp/content/111-templates/101-template-specialization/index.md

@ -23,7 +23,7 @@ void printData(const T& data) {
}
template <>
void printData(const char*& data) {
void printData(const char* const & data) {
std::cout << "Specialized template for const char*: " << data << std::endl;
}
@ -81,4 +81,4 @@ int main() {
}
```
In this example, the `MyPair` template class is partially specialized to provide a different behavior when the second template parameter is of type `int`.
In this example, the `MyPair` template class is partially specialized to provide a different behavior when the second template parameter is of type `int`.

Loading…
Cancel
Save