Skip to content

Commit

Permalink
Disable deprecated headers unless BOOST_TIMER_ENABLE_DEPRECATED is de…
Browse files Browse the repository at this point in the history
…fined
  • Loading branch information
pdimov committed Apr 20, 2023
1 parent 0254b6a commit 85b2642
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/boost/progress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#ifndef BOOST_PROGRESS_HPP
#define BOOST_PROGRESS_HPP

#if !defined(BOOST_TIMER_ENABLE_DEPRECATED)
# error This header is deprecated and will be removed. (You can define BOOST_TIMER_ENABLE_DEPRECATED to suppress this error.)
#endif

#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp> or <boost/timer/progress_display.hpp>" )

Expand Down
4 changes: 4 additions & 0 deletions include/boost/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef BOOST_TIMER_HPP
#define BOOST_TIMER_HPP

#if !defined(BOOST_TIMER_ENABLE_DEPRECATED)
# error This header is deprecated and will be removed. (You can define BOOST_TIMER_ENABLE_DEPRECATED to suppress this error.)
#endif

#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp>" )

Expand Down
2 changes: 2 additions & 0 deletions test/original_timer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// 16 Jul 99 Second beta
// 6 Jul 99 Initial boost version

#define BOOST_TIMER_ENABLE_DEPRECATED

#include <boost/progress.hpp>
#include <iostream>
#include <climits>
Expand Down

0 comments on commit 85b2642

Please sign in to comment.