Remove <iostream> from the common.h header (#14174)

<iostream> embeds a global constructor (to initialize std::cout and such), typically `static ios_base::Init __ioinit;` in libstdc++).

This header is not directly necessary in the common header and has a small impact on every compilation unit that includes it.

As an example, removing that header dependency in turns suppresses 33 global constructors from the firefox core library libxul.

Closes #14174

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/14174 from serge-sans-paille:feature/remove-iostream-from-common d3a6be6ee4
PiperOrigin-RevId: 568626744
pull/14222/head
serge-sans-paille 1 year ago committed by Copybara-Service
parent 153028d7f3
commit 81533b2194
  1. 1
      src/google/protobuf/stubs/common.h

@ -13,7 +13,6 @@
#define GOOGLE_PROTOBUF_COMMON_H__
#include <algorithm>
#include <iostream>
#include <memory>
#include <string>
#include <vector>

Loading…
Cancel
Save