From 6d96d8e09d883e79001359f0b4ffbe3b0f0b13cf Mon Sep 17 00:00:00 2001 From: Timm Knape Date: Thu, 12 Oct 2023 21:42:27 +0200 Subject: [PATCH] I.30: use const c-string to pass filename and input string in example (#2140) to signal that they will not modified --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 8198821..ce24f65 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2310,8 +2310,8 @@ So, we write a class public: enum Opt { from_line = 1 }; Istream() { } - Istream(zstring p) : owned{true}, inp{new ifstream{p}} {} // read from file - Istream(zstring p, Opt) : owned{true}, inp{new istringstream{p}} {} // read from command line + Istream(czstring p) : owned{true}, inp{new ifstream{p}} {} // read from file + Istream(czstring p, Opt) : owned{true}, inp{new istringstream{p}} {} // read from command line ~Istream() { if (owned) delete inp; } operator istream&() { return *inp; } private: