From 62dccb679d636205cac9f6967b265c50dec194bc Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 28 Jul 2016 20:19:14 -0400 Subject: [PATCH] State why we need a default constructor in step-7. The older reason was not quite right, at least as of C++ 2003. --- examples/step-7/step-7.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 308c2ac4b0..6632a91db0 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -181,8 +181,8 @@ namespace Step7 // shape (since it is built into the type of the object itself), so the // compiler can catch most size-related mistakes for us. // - // Just as in previous examples, we are forced by the C++ language - // specification to declare a seemingly useless default constructor. + // Like in step-4, for compatibility with some compilers we explicitly + // declare the default constructor: template class Solution : public Function, protected SolutionBase -- 2.39.5