Skip to content

Commit

Permalink
Replace boost::any with std::any in pxr/base/tf
Browse files Browse the repository at this point in the history
  • Loading branch information
nvmkuruc committed Sep 18, 2023
1 parent 6988a51 commit b787ffd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pxr/base/tf/diagnosticBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
#include "pxr/base/arch/attributes.h"
#include "pxr/base/arch/function.h"

#include <boost/any.hpp>
#include <any>
#include <cstdarg>
#include <string>

PXR_NAMESPACE_OPEN_SCOPE

typedef boost::any TfDiagnosticInfo;
typedef std::any TfDiagnosticInfo;

class TfDiagnosticMgr;

Expand Down Expand Up @@ -160,7 +160,7 @@ class TfDiagnosticBase {
/// then GetInfo() returns NULL.
template <typename T>
const T* GetInfo() const {
return boost::any_cast<T>(&_info);
return std::any_cast<T>(&_info);
}

/// Set the info object associated with this diagnostic message.
Expand Down
4 changes: 2 additions & 2 deletions pxr/base/tf/diagnosticHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
// incompatible macro definitions in pyport.h on macOS.
#include <locale>

#include <boost/any.hpp>
#include <any>
#include <string>

PXR_NAMESPACE_OPEN_SCOPE

typedef boost::any TfDiagnosticInfo;
typedef std::any TfDiagnosticInfo;
class TfCallContext;
enum TfDiagnosticType : int;
class TfEnum;
Expand Down
5 changes: 2 additions & 3 deletions pxr/base/tf/diagnosticMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@
#include "pxr/base/arch/stackTrace.h"
#include "pxr/base/arch/threads.h"

#include <boost/utility.hpp>

#include <signal.h>
#include <stdlib.h>

#include <any>
#include <thread>
#include <memory>

Expand Down Expand Up @@ -673,7 +672,7 @@ TfDiagnosticMgr::FormatDiagnostic(const TfEnum &code,

#ifdef PXR_PYTHON_SUPPORT_ENABLED
if (const TfPyExceptionState* exc =
boost::any_cast<TfPyExceptionState>(&info)) {
std::any_cast<TfPyExceptionState>(&info)) {
output += TfStringPrintf("%s\n", exc->GetExceptionString().c_str());
}
#endif // PXR_PYTHON_SUPPORT_ENABLED
Expand Down

0 comments on commit b787ffd

Please sign in to comment.