
Hello All,
This is how mutex class looks like
#include

This is how mutex class looks like
#include
class mutex: boost::noncopyable { public: mutex(); ~mutex(); void lock(); bool try_lock(); void unlock(); typedef platform-specific-type native_handle_type; native_handle_type native_handle(); typedef unique_lock<mutex> scoped_lock; typedef unspecified-type scoped_try_lock;
};
Please help me figure out what purpose does 'unspecified-type' serve below.
Note that this is just documentation, not the real class definition.

thanks lgor, I looked up my system's headers, its like this typedef unique_lock<mutex> scoped_lock; typedef detail::try_lock_wrapper<mutex> scoped_try_lock;

Abbhishek Misra
Please help me figure out what purpose does 'unspecified-type' serve below.
typedef unspecified-type scoped_try_lock;
It means that the implementation provides a real type, the name of which you're not being told, and which may therefore change. The documentation below tells you what properties this type has. Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

Thanks Antony
On Tue, Jul 27, 2010 at 12:09 PM, Anthony Williams
Abbhishek Misra
writes: Please help me figure out what purpose does 'unspecified-type' serve below.
typedef unspecified-type scoped_try_lock;
It means that the implementation provides a real type, the name of which you're not being told, and which may therefore change. The documentation below tells you what properties this type has.
Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Abbhishek Misra
-
Anthony Williams
-
Igor R