From: "Paolo Brandoli" <paolo.brandoli@gmail.com>
To: pthreads-win32@sourceware.org
Subject: Using pthread_t as a key in a map
Date: Tue, 09 May 2006 20:55:00 -0000 [thread overview]
Message-ID: <553911630605091355q64a6eec6i76cadef9b9efa0e@mail.gmail.com> (raw)
I have a source code that uses the pthread_t as a key in a std::map.
Because pthread-win32 defines pthread_t as a structure, the compilation fails.
I added the following lines in my pthread.h header in order to allow
the usage of pthread_t in the map:
bool operator < (const ptw32_handle_t& left, const ptw32_handle_t& right)
{
return left.p < right.p;
}
bool operator > (const ptw32_handle_t& left, const ptw32_handle_t& right)
{
return left.p > right.p;
}
Bye
Paolo Brandoli
http://www.puntoexe.com
next reply other threads:[~2006-05-09 20:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 20:55 Paolo Brandoli [this message]
2006-05-15 2:23 ` Will Bryant
2006-05-15 11:57 ` Paolo Brandoli
2006-05-15 14:02 ` Robert Kindred
2006-05-15 14:24 ` Ross Johnson
2006-05-16 1:17 ` Ross Johnson
2006-05-16 14:09 ` Paolo Brandoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553911630605091355q64a6eec6i76cadef9b9efa0e@mail.gmail.com \
--to=paolo.brandoli@gmail.com \
--cc=pthreads-win32@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).