Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
About Confluence
Log in
SEI CERT C++ Coding Standard
Edit space details
Pages
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
View Page
A
t
tachments (0)
Page History
Page Information
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
…
SEI CERT C++ Coding Standard
2 Rules
Rule 04. Containers (CTR)
Page Information
Title:
Rule 04. Containers (CTR)
Author:
Aaron Ballman
Sept 30, 2014
Last Changed by:
David Svoboda
Jun 25, 2025
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/_3o-BQ
Export As:
Word
·
PDF
Hierarchy
Parent Page
Page:
2 Rules
Children (9)
Page:
CTR50-CPP. Guarantee that container indices and iterators are within the valid range
Page:
CTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container
Page:
CTR52-CPP. Guarantee that library functions do not overflow
Page:
CTR53-CPP. Use valid iterator ranges
Page:
CTR54-CPP. Do not subtract iterators that do not refer to the same container
Page:
CTR55-CPP. Do not use an additive operator on an iterator if the result would overflow
Page:
CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
Page:
CTR57-CPP. Provide a valid ordering predicate
Page:
CTR58-CPP. Predicate function objects should not be mutable
Labels
Global Labels (4)
rule-list
ctr
rule
section
Recent Changes
Time
Editor
Jun 25, 2025 13:41
David Svoboda
View Changes
Jun 25, 2025 13:34
David Svoboda
View Changes
Jun 25, 2025 13:27
David Svoboda
View Changes
REM cost reform
Mar 15, 2022 09:45
David Svoboda
View Changes
Nov 14, 2019 15:08
Matthew Churilla
View Page History
Outgoing Links
External Links (3)
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
SEI CERT C++ Coding Standard (2)
Home page:
SEI CERT C++ Coding Standard
Page:
Rules from C
Overview
Content Tools
{"serverDuration": 370, "requestCorrelationId": "c740159686a98395"}