Menu

#65 Fix -Wdeprecated-copy warning

None
closed
None
1
2019-06-25
2019-06-19
No

gcc 9.1.1 print warnings for -Wdeprecated-copy by default: tl;dr if you have operator=() defined, you have to explicitly define a copy constructor. You can do that with = default.

(patch against trunk r15559)

1 Attachments

Related

Patches: #63

Discussion

  • Ted Felix

    Ted Felix - 2019-06-19
    • assigned_to: Ted Felix
    • Group: -->
     
  • Ted Felix

    Ted Felix - 2019-06-19

    Thanks.

    I think this was also covered in [patches:#63]. I'm going to take a closer look and likely either apply this, or see if there's any way to get rid of the op=().

     

    Related

    Patches: #63

  • Ted Felix

    Ted Felix - 2019-06-19

    Yeah, the op=() in ColourMap is unnecessary. I am going to delete it. Checking FastVector next...

     
  • Ted Felix

    Ted Felix - 2019-06-19

    As suspected, the FastVector copy ctor and op=() are also unnecessary. Removing...

     
  • Ted Felix

    Ted Felix - 2019-06-19

    Actually, the FastVector op=() and copy ctor look OK. It's all the trivial ones for the iterators that are not necessary. Easily fixed...

     
  • Ted Felix

    Ted Felix - 2019-06-19

    ColourMap warnings should be fixed in [r15560]. FastVector warnings should be fixed in [r15561]. Please test as my gcc is rather old. Thanks.

     

    Related

    Commit: [r15560]
    Commit: [r15561]

  • Ted Felix

    Ted Felix - 2019-06-25
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB