Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3378

warning: ignoring attributes on template argument

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 1.15.1
    • Fix Version/s: None
    • Component/s: libbson
    • Labels:
      None
    • Environment:
      Linux, ubuntu 18.04, x86_64
      compiler: g++ (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0

      Description

      creating vector of bson_t pointers causes warning: "ignoring attributes on template argument ‘bson_t {aka _bson_t*}’ [-Wignored-attributes]"*

      Example of code:

      #include <iostream>
      #include <bson.h>
      #include <vector>
       
      using namespace std;
       
      int
      main( int argc, char **argv){
          bson_t *doc = bson_new();
          bson_init( doc );    std::vector<bson_t *> v;
          v.push_back(doc);
          bson_t *doc2 = v.back();
          v.pop_back();
          bson_destroy(doc2);    return 0;
      }
      

      test_bson_vec.c:13:25: warning: ignoring attributes on template argument ‘bson_t* {aka _bson_t*}’ [-Wignored-attributes]
      std::vector<bson_t *> v;

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: