[CXX-1056] Add mechanism to disable deprecation warnings for a given section of code Created: 01/Oct/16 Updated: 05/Oct/17 Resolved: 25/May/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
It would be nice to be able to test deprecated driver functionality without generating deprecation warnings in the test compile output. In clang, deprecation warnings can be disabled for a section of code as follows:
We should hide such compiler-specific functionality behind a header or macro, and have test code use this mechanism to disable deprecation warnings for the tests of deprecated functionality. As part of the work for this ticket, all existing deprecated API methods should have the BSONCXX_DEPRECATED or MONGOCXX_DEPRECATED specifier added to the method declaration. No deprecation specifiers will be added to public types. In addition, as part of the work for this ticket, we should remove "-Wno-error=deprecated-declarations" from our Evergreen compiler flags, which was temporarily added to work around |
| Comments |
| Comment by J Rassi [ 25/May/17 ] |
|
https://github.com/mongodb/mongo-cxx-driver/commit/55451dde2b893600aed76e258024ba360d803c00 |
| Comment by J Rassi [ 25/May/17 ] |
|
https://github.com/mongodb/mongo-cxx-driver/commit/163227b2753371ff492520c7415df85dfe3b2795 |
| Comment by Githook User [ 21/Apr/17 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: Revert " This reverts commit 438916803e0739f6c5972111ba4d14b0f060a358. |
| Comment by Githook User [ 23/Feb/17 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: This is necessary to work around the fact that the driver currently |
| Comment by J Rassi [ 01/Oct/16 ] |
|
See https://github.com/mongodb/mongo-cxx-driver/pull/541#discussion_r80521303 for further discussion. |