1  // This is only in a header so we can use the system_header pragma,
       2  // to suppress the warning caused by using a reserved init_priority.
       3  #pragma GCC system_header
       4  
       5  // If the target supports init priorities, set up a static object in the
       6  // compiled library to perform the <iostream> initialization once and
       7  // sufficiently early (so that it happens before any other global
       8  // constructor when statically linking with libstdc++.a), instead of
       9  // doing so in (each TU that includes) <iostream>.
      10  // This needs to be done in the same TU that defines the stream objects.
      11  #if _GLIBCXX_USE_INIT_PRIORITY_ATTRIBUTE
      12  static ios_base::Init __ioinit __attribute__((init_priority(90)));
      13  #endif