Commit Graph

234 Commits

Author SHA1 Message Date
Douglas Gregor
51c376c4ee function_base.hpp:
- Fixed for Intel C++, I hope?


[SVN r12469]
2002-01-23 21:17:40 +00:00
Douglas Gregor
58656b40b1 Try to fix for MSVC 7.0
[SVN r12456]
2002-01-23 14:01:28 +00:00
Dave Abrahams
2fa9ee040b Fixes for Intel, added version cutoff for obsolete MWERKS workaround
[SVN r12434]
2002-01-22 13:11:05 +00:00
Douglas Gregor
96f7184528 Untabified
[SVN r12335]
2002-01-17 15:57:13 +00:00
Douglas Gregor
647693dfc9 function_base.hpp:
- Make manager and functor members of function_base public instead of
    protected, because attempt to make HP aCC compile Boost.Function

function_template.hpp:
  - HP aCC seems to believe that the functor and manager members inherited from
    function_base are inaccessible. So qualify them with the function_base
    base class.


[SVN r12298]
2002-01-13 16:12:26 +00:00
Douglas Gregor
d3daf6db42 Renamed BOOST_MSVC_ONLY to BOOST_FUNCTION_TARGET_FIX
Metrowerks needs the BOOST_FUNCTION_TARGET_FIX workaround


[SVN r12144]
2001-12-24 17:10:47 +00:00
Douglas Gregor
ce68cb8999 function_template.hpp:
- Use a C-style cast to deal with constness easily


[SVN r12060]
2001-12-15 00:43:56 +00:00
John Maddock
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
Douglas Gregor
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
Douglas Gregor
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
Douglas Gregor
2265421357 General cleanups
[SVN r11791]
2001-11-27 23:11:44 +00:00
Douglas Gregor
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
Douglas Gregor
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
Douglas Gregor
a4c09a92d1 Generates the functionN.hpp headers
[SVN r11730]
2001-11-19 20:32:07 +00:00
Douglas Gregor
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
Douglas Gregor
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
Douglas Gregor
3c5579ccbc Removed function_cast() and .target_type()
[SVN r11443]
2001-10-25 20:56:14 +00:00
Douglas Gregor
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
Douglas Gregor
e00d8f0afb Fixes for MSVC
[SVN r11363]
2001-10-08 13:49:02 +00:00
Douglas Gregor
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
Douglas Gregor
62d3c6d426 Fix for BOOST_NO_STD_ALLOCATOR when std::allocator doesn't even exist
[SVN r11349]
2001-10-06 20:28:27 +00:00
Douglas Gregor
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
Douglas Gregor
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
Douglas Gregor
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
Douglas Gregor
aad9b5f5e0 function_template.cpp:
- Correctly copy mixin when assigning from any function/function object


[SVN r10617]
2001-07-14 18:51:00 +00:00
Douglas Gregor
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
Douglas Gregor
93ad5963c9 function_base.hpp:
- Changed "RET" to "type" in the IF template metafunction because
	  the GCC source headers define RET as a macro.


[SVN r10509]
2001-07-02 15:25:04 +00:00
Douglas Gregor
48948088fd function_template.hpp:
- One argument functions model AdaptableUnaryFunction
	- Two argument functions model AdaptableBinaryFunction


[SVN r10502]
2001-07-01 19:17:38 +00:00
Douglas Gregor
1f24873577 The void partial specialization of the function classes has been removed in
favor of a common interface. Regardless of the compiler's capabilities, the
result type of a Boost.Function function object that was declared void will
be "unused". This allows the result of a Boost.Function function object to
be passed as a parameter regardless of whether the function is declared as
returning void. It greatly simplifies the use of Boost.Function objects with
wrapper objects (i.e., when the side effects are important, but the result
isn't: consider binding and composition when calling a std::for_each loop)


[SVN r10491]
2001-07-01 02:17:36 +00:00
Douglas Gregor
53f9f4484f Removed consts and associated const_casts from Borland workaround code.
[SVN r10486]
2001-06-29 20:34:32 +00:00
Douglas Gregor
73f380d5ac Boost.Function:
- Redesigned decision procedure for "is it a function pointer" vs.
	  "is it an object".
	- No longer requires copy constructions of function objects during
	  assignment or construction.
	- Added operator! to boost::function_base instead of relying on
	  safe_bool conversion.
	- BOOST_NO_DEPENDENT_BASE_LOOKUP is now unnecessary
	- BOOST_WEAK_CONVERSION_OPERATORS is now unnecessary
	- BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING is now unnecessary


[SVN r10481]
2001-06-29 19:33:29 +00:00
Douglas Gregor
07c66d01fa function.hpp:
- Added self-assignment check in operator= and set()

function_template.hpp:
	- Added self-assignment check in operator= and set()


[SVN r10431]
2001-06-26 13:38:58 +00:00
Douglas Gregor
42aedefe2f * Added initial comments and copyright notices to any files missing them.
* "Acknowledgements" section added to documentation


[SVN r10396]
2001-06-22 14:13:03 +00:00
Beman Dawes
62db26b94d Initial comit
[SVN r10368]
2001-06-21 16:19:33 +00:00