Commit Graph

63 Commits

Author SHA1 Message Date
ce68cb8999 function_template.hpp:
- Use a C-style cast to deal with constness easily


[SVN r12060]
2001-12-15 00:43:56 +00:00
47599fb625 Added inline modifier to trivial_manager -
without this, some compilers (VC6) generate linker errors,
   in any case it is an ODR violation to define this function
   in every translation unit.


[SVN r11984]
2001-12-09 12:49:09 +00:00
1a7478bbd1 Updated docs to reflect changes in code:
- assignments/constructors that took const F& now take F
  - no need to use &free_function for assignment from free functions, unless
    using MSVC6.5


[SVN r11946]
2001-12-05 23:16:39 +00:00
db5399d447 Remove spurious semicolon
[SVN r11944]
2001-12-05 22:39:33 +00:00
083767f67a Taking function objects by value instead of as references-to-const. This does not work on MSVC6.5, so the BOOST_MSVC_ONLY macro was added to make them references-to-const for only that compiler.
- Borland C++ no longer requires hacks to make function pointers work
- On any compiler other than MSVC, free functions can be assigned to Boost.Function objects without the explicit '&'


[SVN r11943]
2001-12-05 22:35:32 +00:00
8cbd121969 function_base.hpp:
- Add trivial_manager that does nothing but copy object pointers
  - Add is_ref to determine if a type is a reference_wrapper
  - Add function_obj_ref_tag for reference_wrappers
  - Teach get_function_tag about reference_wrappers

function_template.hpp:
  - Add assign_to overload for reference_wrappers (these don't throw)


[SVN r11875]
2001-12-03 16:28:33 +00:00
2e67e2126b reference.html:
- Document semantics of reference_wrapper usage

tutorial.html:
  - Add short discussion and example of ref() and cref()


[SVN r11874]
2001-12-03 16:26:19 +00:00
1512df77b1 function_n_test:
function_test:
  - Add testcases using ref() wrapper


[SVN r11873]
2001-12-03 16:25:00 +00:00
2265421357 General cleanups
[SVN r11791]
2001-11-27 23:11:44 +00:00
c64a2f3492 function_template.hpp:
- Changed reinterpret_casts between pointers to member functions
    to C-style casts for MIPSpro.


[SVN r11767]
2001-11-22 00:34:29 +00:00
a657e5c812 Reversed prior commit - tests passing references for the implicit
object parameter to an unbound member function pointer have been
  added again.


[SVN r11732]
2001-11-19 20:57:57 +00:00
cc3a33a19c function_template.hpp:
- Use boost::mem_fn internally to deal with calls to unbound
    member functions.


[SVN r11731]
2001-11-19 20:56:52 +00:00
a4c09a92d1 Generates the functionN.hpp headers
[SVN r11730]
2001-11-19 20:32:07 +00:00
b8e4cdab2f function_base.hpp:
- Updated any_pointer and manager classes to deal with member function
    pointers directly, so no allocation is required when using them.
  - Removed include of boost/mem_fn.hpp

function_template.hpp:
  - Many macros that were in the functionN.hpp headers have been moved here and
    are now generated on-the-fly using BOOST_JOIN
  - Added invokers for pointers to member functions
  - Revised pointer to member function handling code to not perform any
    allocations/deallocations
  - Added guards so that multiple inclusion of function_template.hpp will only
    include its dependencies once.

functionN.hpp:
  - Headers regenerated


[SVN r11729]
2001-11-19 20:30:18 +00:00
d37d210685 function_n_test.cpp:
function_test.cpp:
  - Removed use of (previously existing) ability to use references for the
    first parameter to an unbound pointer-to-member function. Only pointer-like
    entities are allowed.


[SVN r11728]
2001-11-19 20:19:23 +00:00
11c56da46f index.html:
- Removed reference to BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS


[SVN r11727]
2001-11-19 14:57:08 +00:00
3f13d39604 function_base.hpp:
function_template.hpp:
  - Removed implementation based on virtual functions. Such an implementation
    can't meet exception safety requirements made by the manager/invoker
    version.


[SVN r11726]
2001-11-19 14:52:04 +00:00
dd76ed757b Removed question about member function pointers since they are now supported
[SVN r11628]
2001-11-07 20:16:09 +00:00
e5ff80fb52 Documented new feature in tutorial: automatic adaptation of pointers to member functions
Updated reference documentation:
  - Adaptation of pointers to member functions
  - No longer lie about safe_bool
  - Added documentation for operator!
  - Defined "compatible"


[SVN r11458]
2001-10-28 04:52:37 +00:00
6bdc663932 String literals should be const
[SVN r11457]
2001-10-28 04:04:26 +00:00
3c5579ccbc Removed function_cast() and .target_type()
[SVN r11443]
2001-10-25 20:56:14 +00:00
d7ac137669 Remove checks for function_cast and .target_type()
[SVN r11442]
2001-10-25 20:55:56 +00:00
e6011abb87 Added tests for member functions
[SVN r11394]
2001-10-16 19:24:04 +00:00
08d727df21 Added ability to handle member function pointers natively, e.g.,
boost::function<int, X*, int> f(&X::foo);


[SVN r11393]
2001-10-16 19:23:37 +00:00
07390a35e3 Check the const function_cast function
[SVN r11364]
2001-10-08 13:55:55 +00:00
e00d8f0afb Fixes for MSVC
[SVN r11363]
2001-10-08 13:49:02 +00:00
a81c30d130 regression.cfg: Removed defarg_test.cpp entry
[SVN r11362]
2001-10-08 13:34:00 +00:00
4147c42599 defarg_test.cpp: removed (it is incorrect)
function_n_test.cpp:
function_test.cpp:
  Updated with tests of target_type() and casting


[SVN r11361]
2001-10-08 13:33:14 +00:00
1d4282c706 Added support for target_type() member function (returns an std::type_info of
the underlying function object) and casting to retrieve the underyling target.


[SVN r11360]
2001-10-08 13:32:24 +00:00
62d3c6d426 Fix for BOOST_NO_STD_ALLOCATOR when std::allocator doesn't even exist
[SVN r11349]
2001-10-06 20:28:27 +00:00
a30aa907d2 Add a missing space.
[SVN r11152]
2001-09-19 15:07:56 +00:00
b240e7efca Split default and mixin constructor into separate constructors (instead of using default value) because of MSVC 7.0b2 (Peter Dimov)
[SVN r11139]
2001-09-18 14:48:51 +00:00
50fb80c253 Fix broken hyperlink
[SVN r10896]
2001-08-19 15:08:33 +00:00
f79765cce1 reference.html:
- Remove declaration/documentation of non-const operator().
	- Update documentation of operator() const to state that the called
	  object is not cv-qualified.


[SVN r10687]
2001-07-22 05:30:15 +00:00
e34716babd function_n_test.cpp:
function_test.cpp:
	- Updated testcases to reflect semantic change in const calling

policy_test.cpp:
	- precall/postcall in policy should take pointers to const function_base


[SVN r10686]
2001-07-22 05:27:20 +00:00
657a63fce4 function_template.hpp:
- const function calling semantics changed. Now 'function' has
	  pointer/reference semantics (constness of 'function' object does not
	  affect constness of targetted function object)


[SVN r10685]
2001-07-22 05:26:17 +00:00
a9aa465826 function_n_test.cpp:
function_test.cpp:
	- Removed 'static' storage specifier from 'global_int' declaration.
	  Perhaps Sun Workshop 6 will compile Boost.Function now?


[SVN r10684]
2001-07-22 05:03:43 +00:00
aa026cd1d8 defarg_test.cpp:
- Test zero and one arguments


[SVN r10640]
2001-07-17 01:27:42 +00:00
931737f72b reference.html:
- Boldified C++ keywords to make summary more readable.


[SVN r10634]
2001-07-16 18:17:00 +00:00
ce08e55a63 referemce.html:
- Document swapping of mixins in swap()


[SVN r10622]
2001-07-14 20:02:39 +00:00
8121f4ebb6 reference.html:
- Assignment operator and set() function both meet the strong exception
	  guarantee.


[SVN r10621]
2001-07-14 19:58:43 +00:00
d37903b2e7 index.html:
- Removed reference and tutorial: now just link to them

faq.html:
	- Moved to doc/faq.html

doc/faq.html:
	- Relative directory fixups

doc/reference.html:
	- Reference manual for Boost.Function

doc/tutorial.html:
	- Tutorial for Boost.Function (the old "Usage" sections)
	- Additional example showing the use of references and arrays

example/bind1st.cpp:
example/int_div.cpp:
example/sum_avg.cpp:
	- Examples from tutorial


[SVN r10620]
2001-07-14 19:57:09 +00:00
3ba640809b function.hpp:
- Use "self_type" instead of "function" for constructing swapping temporary (Borland C++ needs it)

function_base.hpp:
  - Give empty copy constructor, default constructor, and assignment operator to empty_function_mixin (MSVC generates incorrect ones)

function_template.hpp:
  - Make Borland C++ and MSVC agree on the code (involves an extra constructor definition and careful use of self_type vs. BOOST_FUNCTION_FUNCTION)


[SVN r10619]
2001-07-14 19:34:14 +00:00
131ed15e59 mixin_test.cpp:
- Check assignment from function pointer


[SVN r10618]
2001-07-14 18:58:16 +00:00
aad9b5f5e0 function_template.cpp:
- Correctly copy mixin when assigning from any function/function object


[SVN r10617]
2001-07-14 18:51:00 +00:00
40b70509cc mixin_test.cpp:
- Test persistence of mixins when assigning to a function object


[SVN r10616]
2001-07-14 18:46:42 +00:00
b5f3694938 mixin_test.cpp:
- Test copying of mixins


[SVN r10615]
2001-07-14 18:41:47 +00:00
5754d88110 function.hpp:
- Use swap() for exception safe assignment operators

function_template.hpp:
	- Use swap() for exception safe assignment operators
	- Remove BOOST_FUNCTION_BASE class.
	- Support copying of mixins. (Richard Crossley)


[SVN r10614]
2001-07-14 18:41:19 +00:00
b51aa315da index.html:
- Use relative pathnames for links to generic programming techniques
	  page (Gustavo Guerra).
	- Terminology in Basic Usage intro (Jeremy Siek).


[SVN r10592]
2001-07-11 19:49:26 +00:00
deabdc22c6 faq.html:
- Fixed HTML typo near the end

index.html:
	- Added declarations of all members for all classes.
	- Added detailed description of interface according to Boost
	  guidelines.


[SVN r10591]
2001-07-11 18:55:44 +00:00