title: default member initialization for bitfields and usage of constexpr static bool in preprocessor directives
body: <p>I need to default initialize <code>bitfields</code> of my class using <code>c++11</code> uniform initialization but getting compiler error. Can somebody suggest a work around for this issue. Also I want to know is it possible to pass a <code>constexpr static bool</code> variable in <code>#if</code> directive. This is a sample code:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;endian.h&gt;
  
  class Endiann {
  public:
  
  #ifdef __linux__
  
  #if __BYTE_ORDER == __BIG_ENDIAN
      constexpr static bool BIG_ENDIAN_PRO = true
  #elif __BYTE_ORDER == __LITTLE_ENDIAN
      constexpr static bool BIG_ENDIAN_PRO = false
  #endif
  
  #endif
  
  #ifdef __WIN32__
  
  #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
      constexpr static bool BIG_ENDIAN_PRO = true
  #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
      constexpr static bool BIG_ENDIAN_PRO = false
  #endif
  
  #endif
  
      static void swap_bytes(char *buff, int32_t sizee) {
          char *start = buff, *end = buff + sizee - 1;
  
          while(start &lt; end) {
              char swap = *start;
              *start = *end;
              *end = swap;
  
              ++start;
              --end;
  
          }
      }
  };
  
  constexpr bool Endiann::BIG_ENDIAN_PRO;
  
  struct MSG {
      int16_t a {};
      
  #if Endiann::BIG_ENDIAN_PRO // getting compiler error here
      int16_t b:6 {};
      int16_t c:6 {};
      int16_t d:4 {};
  #else
      int16_t d:4 {};
      int16_t c:6 {};
      int16_t b:6 {};
  #endif
  };
  
  int main() {
      MSG msg; // I know I can use uniform initialization here, but for better assurance I'm using uniform initialization in the struct itself for each member variable
      
      return 0;
  }
  </code></pre>
  <p>I'm using <code>gcc</code> and it supports only <code>c++11</code> standard</p>