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

warning: ignoring attributes on template argument

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 1.15.1
    • libbson
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: