diff --git a/infer/models/cpp/include/infer_model/shared_ptr.h b/infer/models/cpp/include/infer_model/shared_ptr.h index 50bab7872..d9a07b0b6 100644 --- a/infer/models/cpp/include/infer_model/shared_ptr.h +++ b/infer/models/cpp/include/infer_model/shared_ptr.h @@ -405,7 +405,7 @@ class enable_shared_from_this : public std__enable_shared_from_this { template shared_ptr make_shared(Args&&... args) { - return shared_ptr(new T(std::forward(args)...)); + return shared_ptr(::new T(std::forward(args)...)); } #undef __cast_to_infer_ptr diff --git a/infer/models/cpp/include/infer_model/unique_ptr.h b/infer/models/cpp/include/infer_model/unique_ptr.h index e1f1eab09..683c549f3 100644 --- a/infer/models/cpp/include/infer_model/unique_ptr.h +++ b/infer/models/cpp/include/infer_model/unique_ptr.h @@ -446,13 +446,13 @@ struct _MakeUniq2<_Tp[_Bound]> { template inline typename _MakeUniq2<_Tp>::__single_object make_unique( _Args&&... __args) { - return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); + return unique_ptr<_Tp>(::new _Tp(std::forward<_Args>(__args)...)); } /// std::make_unique for arrays of unknown bound template inline typename _MakeUniq2<_Tp>::__array make_unique(size_t __num) { - return unique_ptr<_Tp>(new typename remove_extent<_Tp>::type[__num]()); + return unique_ptr<_Tp>(::new typename remove_extent<_Tp>::type[__num]()); } /// Disable std::make_unique for arrays of known bound