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

warning: ignoring attributes on template argument

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

      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;

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            bozana.hadzic@g3ti.net Bozana Hadzic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: