Skip to content

Remove unncessary <iostream> include - #52

Merged
goulart-paul merged 1 commit into
oxfordcontrol:mainfrom
jwnimmer-tri:iostream
Feb 2, 2025
Merged

goulart-paul merged 1 commit into
oxfordcontrol:mainfrom
jwnimmer-tri:iostream

Conversation

@jwnimmer-tri

Copy link
Copy Markdown
Contributor

Including <iostream> means introducing the static (global) constructors and destructors for std::cin, std::cerr, and std::cout. That extra init and fini code is undesirable when those streams are not actually used.

(See https://en.cppreference.com/w/cpp/io/ios_base/Init for details.)

Including iostream means introducing the static (global) constructors
and destructors for std::cin, std::cerr, and std::cout. That extra
init and fini code is undesirable when those streams are not actually
used.
goulart-paul added a commit that referenced this pull request Jan 13, 2025
@goulart-paul
goulart-paul merged commit 3c1e2aa into oxfordcontrol:main Feb 2, 2025
@jwnimmer-tri
jwnimmer-tri deleted the iostream branch February 2, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants