ban_members,
                  
                  
                      remove_members,
                  
                  
                      change_name,
                  
                  
                      change_perms,
                  
                  
                      delete_content,
                  
                  
                      invite_users,
                  
                  
                      send_content
                  
                  
                  };
                  
                  
                  
                  
                  
                  std::bitset<sizeof(permissions)> user_perms;
                  
                  
                  user_perms.set(permissions::send_content);
                  
                  
                  ?
                  
                  
                
what's the error?
sizeof returns the number of bytes for that type not the number of entries. Assuming your compiler chooses an 32 integral type, your bitset has only 4 bits
you can set the size to send_content+1, but it surely is not portable
Обсуждают сегодня