From 682b285a2128a653424bf62b6c071e3c1c09fe2b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 26 Sep 2024 04:11:10 +0300 Subject: [PATCH] Deprecate headers in boost/detail/ --- extras/src/sp_collector.cpp | 2 +- extras/test/sp_atomic_mt2_test.cpp | 4 ++-- extras/test/sp_atomic_mt_test.cpp | 6 +++--- include/boost/detail/atomic_count.hpp | 17 +++++---------- include/boost/detail/lightweight_mutex.hpp | 18 +++++----------- include/boost/detail/lightweight_thread.hpp | 23 ++++++--------------- include/boost/detail/quick_allocator.hpp | 20 ++++++------------ test/atomic_count_test.cpp | 2 +- test/atomic_count_test2.cpp | 2 +- test/lw_mutex_test.cpp | 2 +- test/lw_thread_test.cpp | 4 ++-- test/shared_ptr_alloc_test.cpp | 2 +- 12 files changed, 34 insertions(+), 68 deletions(-) diff --git a/extras/src/sp_collector.cpp b/extras/src/sp_collector.cpp index bb69ae88bd..dced62e9c7 100644 --- a/extras/src/sp_collector.cpp +++ b/extras/src/sp_collector.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/extras/test/sp_atomic_mt2_test.cpp b/extras/test/sp_atomic_mt2_test.cpp index 750b0b26a7..7bf0961d98 100644 --- a/extras/test/sp_atomic_mt2_test.cpp +++ b/extras/test/sp_atomic_mt2_test.cpp @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/extras/test/sp_atomic_mt_test.cpp b/extras/test/sp_atomic_mt_test.cpp index 32c76c514e..543d7a24f0 100644 --- a/extras/test/sp_atomic_mt_test.cpp +++ b/extras/test/sp_atomic_mt_test.cpp @@ -18,9 +18,9 @@ #include #endif -#include -#include -#include +#include +#include +#include #include #include diff --git a/include/boost/detail/atomic_count.hpp b/include/boost/detail/atomic_count.hpp index 5411c7ae99..ba90183504 100644 --- a/include/boost/detail/atomic_count.hpp +++ b/include/boost/detail/atomic_count.hpp @@ -1,20 +1,13 @@ #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED #define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED -// MS compatible compilers support #pragma once +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif +#include -// -// boost/detail/atomic_count.hpp - thread/SMP safe reference counter -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt +BOOST_HEADER_DEPRECATED("") #include diff --git a/include/boost/detail/lightweight_mutex.hpp b/include/boost/detail/lightweight_mutex.hpp index b7a7f6dd4e..c681e1911e 100644 --- a/include/boost/detail/lightweight_mutex.hpp +++ b/include/boost/detail/lightweight_mutex.hpp @@ -1,21 +1,13 @@ #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED #define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED -// MS compatible compilers support #pragma once +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif +#include -// -// boost/detail/lightweight_mutex.hpp - lightweight mutex -// -// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt -// +BOOST_HEADER_DEPRECATED("") #include diff --git a/include/boost/detail/lightweight_thread.hpp b/include/boost/detail/lightweight_thread.hpp index bf94538a59..2d7ba8f0bd 100644 --- a/include/boost/detail/lightweight_thread.hpp +++ b/include/boost/detail/lightweight_thread.hpp @@ -1,25 +1,14 @@ #ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED #define BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED -// MS compatible compilers support #pragma once +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008, 2018 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif +#include -// boost/detail/lightweight_thread.hpp -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2008, 2018 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt -// -// -// typedef /*...*/ lw_thread_t; // as pthread_t -// template int lw_thread_create( lw_thread_t & th, F f ); -// void lw_thread_join( lw_thread_t th ); +BOOST_HEADER_DEPRECATED("") #include diff --git a/include/boost/detail/quick_allocator.hpp b/include/boost/detail/quick_allocator.hpp index d54b3a792d..e56142c400 100644 --- a/include/boost/detail/quick_allocator.hpp +++ b/include/boost/detail/quick_allocator.hpp @@ -1,22 +1,14 @@ #ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED #define BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED -// MS compatible compilers support #pragma once +// Copyright (c) 2003 David Abrahams +// Copyright (c) 2003 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif +#include -// -// detail/quick_allocator.hpp -// -// Copyright (c) 2003 David Abrahams -// Copyright (c) 2003 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt -// +BOOST_HEADER_DEPRECATED("") #include diff --git a/test/atomic_count_test.cpp b/test/atomic_count_test.cpp index 7a2f0676aa..cfa5a752e5 100644 --- a/test/atomic_count_test.cpp +++ b/test/atomic_count_test.cpp @@ -8,7 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include +#include #include int main() diff --git a/test/atomic_count_test2.cpp b/test/atomic_count_test2.cpp index d7077ccf58..056f8f723d 100644 --- a/test/atomic_count_test2.cpp +++ b/test/atomic_count_test2.cpp @@ -8,7 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt // -#include +#include #include int main() diff --git a/test/lw_mutex_test.cpp b/test/lw_mutex_test.cpp index a47ac1e9a4..fde757268e 100644 --- a/test/lw_mutex_test.cpp +++ b/test/lw_mutex_test.cpp @@ -8,7 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include +#include // Sanity check only diff --git a/test/lw_thread_test.cpp b/test/lw_thread_test.cpp index a43dffdf6e..e61c62c8af 100644 --- a/test/lw_thread_test.cpp +++ b/test/lw_thread_test.cpp @@ -4,9 +4,9 @@ // Copyright 2018 Peter Dimov // Distributed under the Boost Software License, Version 1.0. -#include -#include +#include #include +#include boost::detail::atomic_count count( 0 ); diff --git a/test/shared_ptr_alloc_test.cpp b/test/shared_ptr_alloc_test.cpp index 0dedc37f46..9b1ebdeec9 100644 --- a/test/shared_ptr_alloc_test.cpp +++ b/test/shared_ptr_alloc_test.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include