appendNum(bool) uses implementation specific behavior

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In BufBuilder there is a method appendNum(bool) defined as such:

             void appendNum(bool j) {                                                                                                                                                                                                              
                  *((bool*)grow(sizeof(bool))) = j;                                                                                                                                                                                                 
              }  
      

      The C++ standard explicitly states that the size of a bool is implementation defined. This method should be removed or rewritten, and the codebase should be audited for any uses of it.

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Adam Midvidy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: