Skip to content

Commit

Permalink
Deprecate headers in boost/detail/
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Sep 26, 2024
1 parent 94d3130 commit 682b285
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 68 deletions.
2 changes: 1 addition & 1 deletion extras/src/sp_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <boost/assert.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/detail/lightweight_mutex.hpp>
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
#include <cstdlib>
#include <map>
#include <deque>
Expand Down
4 changes: 2 additions & 2 deletions extras/test/sp_atomic_mt2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <boost/thread/shared_mutex.hpp>
#include <boost/thread/locks.hpp>

#include <boost/detail/lightweight_mutex.hpp>
#include <boost/detail/lightweight_thread.hpp>
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
#include <boost/smart_ptr/detail/lightweight_thread.hpp>

#include <vector>
#include <numeric>
Expand Down
6 changes: 3 additions & 3 deletions extras/test/sp_atomic_mt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <boost/thread/locks.hpp>
#endif

#include <boost/detail/lightweight_mutex.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/lightweight_thread.hpp>
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
#include <boost/smart_ptr/detail/lightweight_thread.hpp>
#include <boost/core/lightweight_test.hpp>

#include <cstdio>
#include <ctime>
Expand Down
17 changes: 5 additions & 12 deletions include/boost/detail/atomic_count.hpp
Original file line number Diff line number Diff line change
@@ -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/config/header_deprecated.hpp>

//
// 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("<boost/smart_ptr/detail/atomic_count.hpp>")

#include <boost/smart_ptr/detail/atomic_count.hpp>

Expand Down
18 changes: 5 additions & 13 deletions include/boost/detail/lightweight_mutex.hpp
Original file line number Diff line number Diff line change
@@ -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/config/header_deprecated.hpp>

//
// 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("<boost/smart_ptr/detail/lightweight_mutex.hpp>")

#include <boost/smart_ptr/detail/lightweight_mutex.hpp>

Expand Down
23 changes: 6 additions & 17 deletions include/boost/detail/lightweight_thread.hpp
Original file line number Diff line number Diff line change
@@ -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/config/header_deprecated.hpp>

// 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<class F> int lw_thread_create( lw_thread_t & th, F f );
// void lw_thread_join( lw_thread_t th );
BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/lightweight_thread.hpp>")

#include <boost/smart_ptr/detail/lightweight_thread.hpp>

Expand Down
20 changes: 6 additions & 14 deletions include/boost/detail/quick_allocator.hpp
Original file line number Diff line number Diff line change
@@ -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 <boost/config/header_deprecated.hpp>

//
// 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("<boost/smart_ptr/detail/quick_allocator.hpp>")

#include <boost/smart_ptr/detail/quick_allocator.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/atomic_count_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#include <boost/detail/atomic_count.hpp>
#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/core/lightweight_test.hpp>

int main()
Expand Down
2 changes: 1 addition & 1 deletion test/atomic_count_test2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt
//

#include <boost/detail/atomic_count.hpp>
#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/core/lightweight_test.hpp>

int main()
Expand Down
2 changes: 1 addition & 1 deletion test/lw_mutex_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#include <boost/detail/lightweight_mutex.hpp>
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>

// Sanity check only

Expand Down
4 changes: 2 additions & 2 deletions test/lw_thread_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// Copyright 2018 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.

#include <boost/detail/lightweight_thread.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/detail/lightweight_thread.hpp>
#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/core/lightweight_test.hpp>

boost::detail::atomic_count count( 0 );

Expand Down
2 changes: 1 addition & 1 deletion test/shared_ptr_alloc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <boost/shared_ptr.hpp>
#include <boost/config.hpp>
#include <boost/detail/quick_allocator.hpp>
#include <boost/smart_ptr/detail/quick_allocator.hpp>

#include <iostream>
#include <vector>
Expand Down

0 comments on commit 682b285

Please sign in to comment.