boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
200 stars 161 forks source link

future.hpp: Fixed name shadowing #198

Closed Kojoley closed 6 years ago

Kojoley commented 6 years ago
gcc.compile.c++ ../../../../bin.v2/libs/thread/build/gcc-gnu-6/release/cxxstd-03-iso/threadapi-pthread/threading-multi/pthread/thread.o
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp: In constructor ‘boost::detail::shared_state<T>::shared_state(const boost::exceptional_ptr&)’:
../../../../boost/thread/future.hpp:545:52: error: declaration of ‘ex’ shadows a member of ‘boost::detail::shared_state<T>’ [-Werror=shadow]
             shared_state(exceptional_ptr const& ex):
                                                    ^
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp:162:31: note: shadowed declaration is here
             executor_ptr_type ex;
                               ^~
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp: In constructor ‘boost::detail::shared_state<T&>::shared_state(const boost::exceptional_ptr&)’:
../../../../boost/thread/future.hpp:731:52: error: declaration of ‘ex’ shadows a member of ‘boost::detail::shared_state<T&>’ [-Werror=shadow]
             shared_state(exceptional_ptr const& ex):
                                                    ^
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp:162:31: note: shadowed declaration is here
             executor_ptr_type ex;
                               ^~
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp: In constructor ‘boost::detail::shared_state<void>::shared_state(const boost::exceptional_ptr&)’:
../../../../boost/thread/future.hpp:810:52: error: declaration of ‘ex’ shadows a member of ‘boost::detail::shared_state<void>’ [-Werror=shadow]
             shared_state(exceptional_ptr const& ex):
                                                    ^
In file included from ../../../../libs/thread/src/pthread/thread.cpp:19:0:
../../../../boost/thread/future.hpp:162:31: note: shadowed declaration is here
             executor_ptr_type ex;
                               ^~