boostorg / ptr_container

Boost.org ptr_container module
http://boost.org/libs/ptr_container
Boost Software License 1.0
13 stars 41 forks source link

Disable auto_ptr deprecation warnings on g++/clang #11

Closed Romain-Geissler-1A closed 6 years ago

Romain-Geissler-1A commented 6 years ago

Hi,

By default, when you use GCC 6, there are some annoying warnings each time auto_ptr are exposed in the API (even when you don't use them). This silences this warnings. It was largely inspired from this commit https://github.com/boostorg/smart_ptr/commit/df904965833dcf1bf2eb4d7d1416369dd806e092 from @pdimov (boost/ptr_container/detail/ptr_container_disable_deprecated.hpp was almost copied as is, I even left the copyright, I hope it is OK).

Cheers, Romain

Romain-Geissler-1A commented 6 years ago

The build failures are due to issues fixed in #12. Just merge it first, then merge this one to have a clean build.

Romain-Geissler-1A commented 6 years ago

The build is now green. I don't know if you want me to rebase on top of "develop" now that @pdimov merged #12, just let me know.

pdimov commented 6 years ago

I don't think that rebasing is necessary.

pdimov commented 6 years ago

I think that there are a few warnings still left though.

pdimov commented 6 years ago
..\../boost/ptr_container/ptr_unordered_map.hpp:199:9: note: in expansion of macro 'BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE'

and

..\../boost/ptr_container/ptr_unordered_set.hpp:108:9: note: in expansion of macro 'BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE'
Romain-Geissler-1A commented 6 years ago

Indeed. Remaining issues are fixed in #13.