Ticket #2602: thread.patch

File thread.patch, 1.8 KB (added by Steven Watanabe, 13 years ago)
  • boost/thread/locks.hpp

     
    214214        unique_lock& operator=(unique_lock&);
    215215        unique_lock& operator=(upgrade_lock<Mutex>& other);
    216216    public:
     217#ifdef __SUNPRO_CC
     218        unique_lock(const volatile unique_lock&);
     219#endif
    217220        unique_lock():
    218221            m(0),is_locked(false)
    219222        {}
     
    297300            return detail::thread_move_t<unique_lock<Mutex> >(*this);
    298301        }
    299302
     303#ifdef __SUNPRO_CC
     304        unique_lock& operator=(unique_lock<Mutex> other)
     305        {
     306            swap(other);
     307            return *this;
     308        }
     309#else
    300310        unique_lock& operator=(detail::thread_move_t<unique_lock<Mutex> > other)
    301311        {
    302312            unique_lock temp(other);
    303313            swap(temp);
    304314            return *this;
    305315        }
     316#endif
    306317
    307318        unique_lock& operator=(detail::thread_move_t<upgrade_lock<Mutex> > other)
    308319        {
  • boost/thread/detail/thread.hpp

     
    144144        struct dummy;
    145145#endif
    146146    public:
     147#ifdef __SUNPRO_CC
     148        thread(const volatile thread&);
     149#endif
    147150        thread();
    148151        ~thread();
    149152
     
    202205            x->thread_info.reset();
    203206        }
    204207       
     208#ifdef __SUNPRO_CC
     209        thread& operator=(thread x)
     210        {
     211            swap(x);
     212            return *this;
     213        }
     214#else
    205215        thread& operator=(detail::thread_move_t<thread> x)
    206216        {
    207217            thread new_thread(x);
    208218            swap(new_thread);
    209219            return *this;
    210220        }
     221#endif
    211222       
    212223        operator detail::thread_move_t<thread>()
    213224        {