Remove <iostream> from the common.h header

<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.
pull/14174/head
serge-sans-paille 1 year ago
parent a30d71d873
commit d3a6be6ee4
  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