Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Bind1st in plain C (cross-platform, thread-safe, re-enterable)

Thread Tools

Bind1st in plain C (cross-platform, thread-safe, re-enterable)
Posts: n/a
Hi all,
Few weeks ago I got a question in my head is it possible to make plain-C substitution for bind1st() algo from STL lib. I got some macros-based drafts working there but...
1) they're ugly, you know
2) they actually do for constants only (run-time values don't fit to my macros)
3) best-candidate macro appears as GCC-specific (due nested functions)

So finally I got understanding that such binders are not-implementable in plain ANSI C due statefull nature (keeping in mind the requirements for thread-safe and re-entrant implementation).

Very thanks for your oppinions,
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why this is wrong in calling bind1st John Black C++ 3 08-08-2004 07:02 AM
reference to reference and constness problems with bind1st Marc C++ 6 07-06-2004 02:01 PM
binary_function and bind1st Denis Remezov C++ 6 05-21-2004 11:36 AM
STL bind1st counterpart for unary function Fred Ma C++ 2 02-05-2004 10:52 AM
How does bind1st() work in this case? wenmang C++ 1 08-08-2003 07:28 PM