Skip to content

Commit

Permalink
Suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
petya2164 committed Apr 18, 2018
1 parent 233d7c0 commit 9e2f1b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boost/python/extract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,20 @@ namespace converter
inline typename extract_rvalue<T>::result_type
extract_rvalue<T>::operator()() const
{
#if defined(BOOST_GCC) && BOOST_GCC > 60300
#pragma GCC diagnostic push
// Recent versions of g++ produce a maybe-uninitialized warning here
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
return *(T*)(
// Only do the stage2 conversion once
m_data.stage1.convertible == m_data.storage.bytes
? m_data.storage.bytes
: (rvalue_from_python_stage2)(m_source, m_data.stage1, registered<T>::converters)
);
#if defined(BOOST_GCC) && BOOST_GCC > 60300
#pragma GCC diagnostic pop
#endif
}

template <class Ref>
Expand Down

0 comments on commit 9e2f1b5

Please sign in to comment.