From b0cd06aa2ee6b8c1f73e741584c404b74878d24c Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Sun, 2 Apr 2017 12:50:48 -0700 Subject: [PATCH] Updated note in C.131 to add clarity. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 6d4f14c..82ffe0c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -6559,7 +6559,7 @@ Note that we can put default initializers on member variables: [C.49: Prefer ini ##### Note -A getter or a setter that converts from an internal type to an interface type is not trivial (it provides a form of information hiding). +The key to this rule is whether the semantics of the getter/setter are trivial. While it is not a complete definition of "trivial", consider whether there would be any difference beyond syntax if the getter/setter was a public data member instead. Examples of non-trival semantics would be: maintaining a class invariant or converting between an internal type and an interface type. ##### Enforcement