From 8903f11f0220a6347172c8766515a7718f20aca4 Mon Sep 17 00:00:00 2001 From: Andret Carpizo <69943379+andretcarpizo@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:31:24 -0600 Subject: [PATCH] Fix Template Specialization Index CodeBlock for const in printData (#4446) --- .../111-templates/101-template-specialization/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/roadmaps/cpp/content/111-templates/101-template-specialization/index.md b/src/data/roadmaps/cpp/content/111-templates/101-template-specialization/index.md index 65a274840..041ab1827 100644 --- a/src/data/roadmaps/cpp/content/111-templates/101-template-specialization/index.md +++ b/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`. \ No newline at end of file +In this example, the `MyPair` template class is partially specialized to provide a different behavior when the second template parameter is of type `int`.