From 5784472b2398373df6d00fd9489529d7a7cc730d Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 7 Aug 2016 09:36:11 -0400 Subject: [PATCH] Redo the explanation of a default constructor. clang 3.8 requires this default constructor be present in 98, 11, or 14 modes, which does techically follow the standard (section 8.5). --- examples/step-4/step-4.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/step-4/step-4.cc b/examples/step-4/step-4.cc index bec2af5372..f50a1499ed 100644 --- a/examples/step-4/step-4.cc +++ b/examples/step-4/step-4.cc @@ -125,11 +125,11 @@ private: // what is done in step-5), but since this is a tutorial we inherit from // Function for the sake of example. // -// Unfortunately, some compilers (notably clang 3.8) have a bug where they -// cannot figure out the default constructor (that is, the constructor which -// takes no arguments) of classes derived from Function. For portability we -// provide such constructors in all the tutorial programs so that all -// supported compilers are happy. +// Unfortunately, we have to explicitly provide a default constructor for this +// class (even though we do not need the constructor to do anything unusual) +// to satisfy a strict reading of the C++ language standard. Some compilers +// (like GCC from version 4.3 onwards) do not require this, but we provide the +// default constructor so that all supported compilers are happy. template class RightHandSide : public Function { -- 2.39.5