diff --git a/bind.html b/bind.html index 49f8018..73b20d0 100644 --- a/bind.html +++ b/bind.html @@ -15,10 +15,7 @@ c++boost.gif (8819 bytes) - - - -

bind.hpp

 1.02.0001 (2001-10-18)
+

bind.hpp

@@ -32,6 +29,8 @@
  • bind_test.cpp (test)
  • bind_as_compose.cpp (function composition example)
  • bind_visitor.cpp (visitor example)
  • +
  • bind_stdcall_test.cpp (test with __stdcall functions)
  • +
  • bind_stdcall_mf_test.cpp (test with __stdcall member functions)
  • Purpose

    @@ -630,6 +629,38 @@ workaround is to change the return type of the function object in question from void to int and return a dummy value of 0.

    +

    __stdcall support

    + +

    +Some platforms allow several types of (member) functions that differ by their +calling convention (the rules by which the function is invoked: how +are arguments passed, how is the return value handled, and who cleans up the +stack - if any.) +

    + +

    +For example, Windows API functions and COM interface member functions use a +calling convention known as __stdcall. +

    + +

    +To use bind with __stdcall functions, #define the macro +BOOST_BIND_ENABLE_STDCALL before including <boost/bind.hpp>. +

    + +

    +To use bind with __stdcall member functions, #define the +macro BOOST_MEM_FN_ENABLE_STDCALL before including <boost/bind.hpp>. +

    + +

    +[Note: this is a non-portable extension. It is not part of the interface.] +

    + +

    +[Note: Some compilers provide only minimal support for the __stdcall keyword.] +

    +

    MSVC specific problems and workarounds

    diff --git a/mem_fn.html b/mem_fn.html index 91901ea..a7abab3 100644 --- a/mem_fn.html +++ b/mem_fn.html @@ -15,10 +15,7 @@ c++boost.gif (8819 bytes) - - - -

    mem_fn.hpp

     1.02.0001 (2001-08-30)
    +

    mem_fn.hpp

    @@ -30,6 +27,7 @@

    Purpose

    @@ -242,6 +240,35 @@ This is not an inherent limitation of the design, but an implementation detail.

    +

    __stdcall support

    + +

    +Some platforms allow several types of member functions that differ by their +calling convention (the rules by which the function is invoked: how +are arguments passed, how is the return value handled, and who cleans up the +stack - if any.) +

    + +

    +For example, Windows API functions and COM interface member functions use a +calling convention known as __stdcall. +

    + +

    +To use mem_fn with __stdcall member functions, #define +the macro BOOST_MEM_FN_ENABLE_STDCALL before including, directly or +indirectly, <boost/mem_fn.hpp>. +

    + +

    +[Note: this is a non-portable extension. It is not part of the interface.] +

    + +

    +[Note: Some compilers provide only minimal support for the __stdcall keyword.] +

    + +

    Acknowledgements

    @@ -256,6 +283,9 @@ Richard Crossley, Jens Maurer, Ed Brey, and others. Review manager was Darin Adler.

    +

    +Steve Anichini pointed out that COM interfaces use __stdcall. +




    Copyright © 2001 by Peter Dimov and Multi Media Ltd. Permission to copy, use, modify, sell and distribute this document is