Ticket #4060: boost_thread_detail_BOOST_NO_IOSTREAM.diff

File boost_thread_detail_BOOST_NO_IOSTREAM.diff, 869 bytes (added by nigels@…, 13 years ago)

thread_id::operator<< if BOOST_NO_IOSTREAM is defined

  • thread.hpp

     
    66// (C) Copyright 2007-8 Anthony Williams
    77 
    88#include <boost/thread/exceptions.hpp>
     9#ifndef BOOST_NO_IOSTREAM
    910#include <ostream>
     11#endif
    1012#include <boost/thread/detail/move.hpp>
    1113#include <boost/thread/mutex.hpp>
    1214#include <boost/thread/xtime.hpp>
     
    430432            return !(thread_data<y.thread_data);
    431433        }
    432434
     435#ifndef BOOST_NO_IOSTREAM
    433436        template<class charT, class traits>
    434437        friend std::basic_ostream<charT, traits>&
    435438        operator<<(std::basic_ostream<charT, traits>& os, const id& x)
     
    443446                return os<<"{Not-any-thread}";
    444447            }
    445448        }
     449#endif
    446450    };
    447451
    448452    inline bool thread::operator==(const thread& other) const