boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
198 stars 162 forks source link

Fix "interruption_point" defined twice #260

Closed DesWurstes closed 5 years ago

DesWurstes commented 5 years ago
In file included from /usr/local/include/boost/thread/thread_only.hpp:22,
                 from /usr/local/include/boost/thread/thread.hpp:12,
                 from /usr/local/include/boost/thread.hpp:13,
                 from validation.cpp:48:
/usr/local/include/boost/thread/detail/thread.hpp:591:32: warning: redundant redeclaration of 'void boost::this_thread::interruption_point()' in same scope [-Wredundant-decls]
         void BOOST_THREAD_DECL interruption_point();
                                ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/boost/thread/condition_variable.hpp:16,
                 from ./checkqueue.h:13,
                 from validation.cpp:12:
/usr/local/include/boost/thread/pthread/condition_variable.hpp:32:32: note: previous declaration of 'void boost::this_thread::interruption_point()'
         void BOOST_THREAD_DECL interruption_point();
                                ^~~~~~~~~~~~~~~~~~
viboes commented 5 years ago

I can not accept this PR. If the declaration must be only once, then we should avoid having it in two files. I would accept a PR where the declaration is in another file included by both :)

DesWurstes commented 5 years ago

Thanks for the quick reply! Is it okay now?

viboes commented 5 years ago

Thanks fro the quick reaction.

Please let me know what do you think about moving all the interrupt related declarations declarations to a single interrupt.hpp file

DesWurstes commented 5 years ago

Is that okay now?

viboes commented 5 years ago

Yes, it is ok now :)