Closed Lastique closed 1 year ago
clang-15 generates the following warnings:
In file included from libs/filesystem/test/path_unit_test.cpp:37: In file included from ./boost/smart_ptr.hpp:24: In file included from ./boost/make_shared.hpp:14: In file included from ./boost/smart_ptr/make_shared.hpp:14: In file included from ./boost/smart_ptr/make_shared_object.hpp:15: In file included from ./boost/move/core.hpp:58: ./boost/move/detail/type_traits.hpp:1003:29: warning: builtin __has_trivial_move_constructor is deprecated; use __is_trivially_constructible instead [-Wdeprecated-builtins] { static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); }; ^ ./boost/move/detail/type_traits.hpp:418:60: note: expanded from macro 'BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE' #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) || ::boost::move_detail::is_pod<T>::value ^ ./boost/move/detail/type_traits.hpp:196:57: note: expanded from macro 'BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR' # define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) ^ ./boost/move/detail/type_traits.hpp:1019:30: warning: builtin __has_trivial_move_assign is deprecated; use __is_trivially_assignable instead [-Wdeprecated-builtins] { static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); }; ^ ./boost/move/detail/type_traits.hpp:432:56: note: expanded from macro 'BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE' #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) || ::boost::move_detail::is_pod<T>::value ^ ./boost/move/detail/type_traits.hpp:203:52: note: expanded from macro 'BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN' # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) ^ ./boost/move/detail/type_traits.hpp:1040:30: warning: builtin __has_trivial_move_assign is deprecated; use __is_trivially_assignable instead [-Wdeprecated-builtins] { static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); }; ^ ./boost/move/detail/type_traits.hpp:464:58: note: expanded from macro 'BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE' #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ^ ./boost/move/detail/type_traits.hpp:432:56: note: expanded from macro 'BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE' #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) || ::boost::move_detail::is_pod<T>::value ^ ./boost/move/detail/type_traits.hpp:203:52: note: expanded from macro 'BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN' # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) ^ ./boost/move/detail/type_traits.hpp:1054:30: warning: builtin __has_nothrow_move_assign is deprecated; use __is_nothrow_assignable instead [-Wdeprecated-builtins] { static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); }; ^ ./boost/move/detail/type_traits.hpp:468:53: note: expanded from macro 'BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE' #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) || ::boost::move_detail::is_pod<T>::value ^ ./boost/move/detail/type_traits.hpp:217:52: note: expanded from macro 'BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN' # define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) __has_nothrow_move_assign(T) ^
See also https://github.com/boostorg/type_traits/pull/174.
I'm getting these as well from SmartPtr, which is a problem because I test with warnings-as-errors=on. Can we please get that fixed?
warnings-as-errors=on
How can I reproduce it?
https://godbolt.org/z/5c1EhhPPT
Got it, we need to use -std=c++03.
clang-15 generates the following warnings: