Skip to content

Commit

Permalink
Fixing support for std::unique_ptr with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Sep 3, 2020
1 parent c63f6ac commit 55170bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/apex/otf2_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ namespace apex {

/* Stupid Intel compiler CLAIMS to be C++14, but doesn't have support for
* std::unique_ptr. */
#if __cplusplus < 201402L || defined(__INTEL_COMPILER)
/* Same goes for Clang, which claims to be C++17! */
#if __cplusplus < 201402L || defined(__INTEL_COMPILER) || defined(__clang__)
template<typename T, typename... Args>
std::unique_ptr<T> my_make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
Expand Down

0 comments on commit 55170bf

Please sign in to comment.