Skip to content

Commit 63e2cd0

Browse files
committed
Closes #1585
1 parent 01fa6a9 commit 63e2cd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11842,6 +11842,8 @@ Instead, prefer to put the common code in a common helper function -- and make i
1184211842
{ /* the complex logic around getting a possibly-const reference to my_bar */ }
1184311843
};
1184411844

11845+
Note: Don't do large non-dependent work inside a template, which leads to code bloat. For example, a further improvement would be if all or part of `get_bar_impl` can be non-dependent and factored out into a common non-template function, for a potentially big reduction in code size.
11846+
1184511847
##### Exception
1184611848

1184711849
You may need to cast away `const` when calling `const`-incorrect functions.

0 commit comments

Comments
 (0)