Skip to content

Commit

Permalink
Only define pragma on GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Nov 20, 2024
1 parent f69c782 commit f7c4977
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libmamba/src/solver/problems_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ namespace mamba::solver
}

// GCC reports dangling reference when using std::invoke with data members
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-reference"
#endif

template <typename T>
auto invoke_version(T&& e) -> decltype(auto)
Expand Down Expand Up @@ -332,7 +334,9 @@ namespace mamba::solver
}
}

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

/**
* Detect if a type has a ``name`` member (function).
Expand Down

0 comments on commit f7c4977

Please sign in to comment.