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

Discussion in 'C Programming' started by yury.schkatula@gmail.com, Dec 6, 2012.

  1. Guest

    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
     
    , Dec 6, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wenmang
    Replies:
    1
    Views:
    501
    Victor Bazarov
    Aug 8, 2003
  2. Fred Ma
    Replies:
    2
    Views:
    2,058
    Fred Ma
    Feb 5, 2004
  3. Alfonso Morra
    Replies:
    1
    Views:
    433
    Alfonso Morra
    Jul 18, 2005
  4. Gabriel Rossetti
    Replies:
    0
    Views:
    1,326
    Gabriel Rossetti
    Aug 29, 2008
  5. John Nagle
    Replies:
    5
    Views:
    473
    John Nagle
    Mar 12, 2012
Loading...

Share This Page