Bind1st in plain C (cross-platform, thread-safe, re-enterable)

Y

yury.schkatula

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,
Yury
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top