Commit Graph

103 Commits

Author SHA1 Message Date
Daniel James
ff3244d562 When copying boost::ref, copy even when the referenced function is empty. Fixes #2642
Patch by Steven Watanabe

[SVN r54616]
2009-07-03 22:20:26 +00:00
Vladimir Prus
68128bfffa Make Boost.Function compile with disabled exceptions.
Closes #2900. Patch from Gabi Davar.


[SVN r53722]
2009-06-07 15:44:50 +00:00
Douglas Gregor
a74e72cce9 Make Boost.Function compile under BOOST_NO_EXCEPTIONS.
Fixes #2499
Fixes #2494
Fixes #2469
Fixes #2466


[SVN r51745]
2009-03-13 05:49:02 +00:00
Douglas Gregor
6f8ec5c8c5 Implement an optimization that David Abrahams and myself came up with,
where Boost.Function uses a bit in the vtable pointer to indicate when
the target function object has a trivial copy constructor, trivial
destructor, and fits within the small object buffer. In this case, we
just copy the bits of the function object rather than performing an
indirect call to the manager.

This results in a 60% speedup on a micro-benchmark that copies and
calls such function objects repeatedly.



[SVN r51743]
2009-03-13 05:23:53 +00:00
Douglas Gregor
8ca7384121 Fix Boost.Function thread safety issue again
[SVN r49326]
2008-10-14 15:31:57 +00:00
Douglas Gregor
2fe4cc253f Fix double-destruction problem with small function objects and swap(), and try to work around a GCC 4.2 issue. See #1910 for comments about the former problem from Niels Dekker.
[SVN r48627]
2008-09-06 03:16:25 +00:00
Douglas Gregor
f379ef8532 Make Boost.Function's target() operation respect the cv-qualifiers of referenced function objects. Fixes #736
[SVN r48618]
2008-09-05 17:52:12 +00:00
Douglas Gregor
d5a86a2d52 Improve the performance of Boost.Function's swap. Thanks to Niels Dekker for the original patch. Fixes #1910
[SVN r48615]
2008-09-05 15:43:22 +00:00
Douglas Gregor
adb7b0a214 Change Boost.Function allocator behavior, from Emil Dotchevski
[SVN r43884]
2008-03-27 19:44:37 +00:00
Douglas Gregor
cead36cd5b Disable more Visual C++ warnings in Function headers. Fixes #1416
[SVN r41798]
2007-12-06 18:39:06 +00:00
John Maddock
2378ba59e7 Fix for Borland compilers.
[SVN r39657]
2007-10-02 17:41:35 +00:00
Douglas Gregor
53b95c386d Finalizes the fix to Bug #1260, making vtable_base an actual POD type (oops)
and playing more nicely with reinterpret_cast (thanks to Brad King for the
fixes).



[SVN r39285]
2007-09-14 21:05:46 +00:00
Douglas Gregor
3312c7ffcd function_template.hpp:
- Pass-by-reference internally, when we can. Fixes #1067



[SVN r39244]
2007-09-13 19:06:53 +00:00
Douglas Gregor
de27ae9697 function/function_base.hpp, function/function_template.hpp:
- Switch from dynamic initialization of the vtable pointer to static
    initialization (Fixes #1260)
  - Handle member pointers properly, only using mem_fn within the invoker
    to deal with all of the messy bits of calling member pointers



[SVN r39240]
2007-09-13 17:38:58 +00:00
Douglas Gregor
a7b9940f15 Handle GCC's -fno-exceptions properly. Fixes #1198
[SVN r39061]
2007-08-29 19:06:11 +00:00
Peter Dimov
872f12efee TR1 conformance: derive from unary_function/binary_function
[SVN r34481]
2006-07-08 18:07:33 +00:00
Peter Dimov
69ee6e2375 Fixed an 'unused parameter' warning.
[SVN r33204]
2006-03-02 21:24:57 +00:00
Ralf W. Grosse-Kunstleve
58b61efb5f trivial adjustments to enable warning-free compilation with gcc -Wall -W -Werror
[SVN r32364]
2006-01-20 16:53:30 +00:00
Douglas Gregor
78f6b385d5 Small buffer optimization for Boost.Function
[SVN r32282]
2006-01-10 23:52:35 +00:00
Douglas Gregor
93c691fbdf function_base.hpp, function_template.hpp:
- Use a vtable instead of separate manager/invoker pointers, to shrink the
    size of a boost::function object to 8 bytes
  - Fix a problem with NULL member pointers


[SVN r32186]
2005-12-30 02:31:51 +00:00
Hartmut Kaiser
6023ff5608 Workaround for a problem in Wave.
[SVN r32094]
2005-12-18 21:06:32 +00:00
John Maddock
35e2ff56a0 Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
[SVN r30670]
2005-08-25 16:27:28 +00:00
Douglas Gregor
b5b12295c2 Try to work around Borland parsing bug
[SVN r30645]
2005-08-24 14:12:03 +00:00
Douglas Gregor
eea010ef80 Fully-qualify detail namespace accesses to work around compiler bugs
[SVN r30627]
2005-08-22 12:55:34 +00:00
Douglas Gregor
e2a7fea741 Workarounds for CW 9.2, from Reece Dunn
[SVN r26583]
2004-12-26 22:05:19 +00:00
Douglas Gregor
e14e57a678 Fix BOOST_NO_VOID_RETURNS workaround
[SVN r26518]
2004-12-15 21:40:30 +00:00
Douglas Gregor
520ee97c82 Doug Gregor -> Douglas Gregor
[SVN r24016]
2004-07-25 02:29:29 +00:00
Douglas Gregor
e4f632e5ca function_template.hpp: Move definition of operator() out-of-line for
any compiler that isn't VC++ 6.0 (Vladimir Prus)


[SVN r23436]
2004-07-11 03:09:35 +00:00
Douglas Gregor
22fd23b00f function_template.hpp, function_base.hpp:
- Comparison operators are now written in terms of function_base so that
    implicit conversions to function<...> or functionN<...> don't allow
    arbitrary comparisons.


[SVN r23126]
2004-06-20 05:32:28 +00:00
Douglas Gregor
ae11f21513 Try to make IBM VisualAge C++ 6 happy
[SVN r22795]
2004-05-12 00:39:00 +00:00
Douglas Gregor
1b27dc8f86 Fix some shadow warnings
[SVN r22670]
2004-04-20 00:32:48 +00:00
Douglas Gregor
2c0e633307 Added contains() and function_equal()
[SVN r22483]
2004-03-12 03:38:20 +00:00
Douglas Gregor
1a142a2f94 Fix on GCC 2.9x from Ralf
[SVN r22249]
2004-02-12 22:48:22 +00:00
Douglas Gregor
746676d274 Fix semantics for comparison against reference_wrappers
[SVN r21901]
2004-01-24 23:31:40 +00:00
Douglas Gregor
cb1bcd5410 "contains" -> "target"
[SVN r21845]
2004-01-20 18:07:13 +00:00
Douglas Gregor
7d30d98efd boost/function/function_template.hpp, boost/function/function_base.hpp:
- Added "contains" member function to extract a pointer to the target
    function object if you know its type
  - Added operator== that can compare a Boost.Function object against a
    function object

libs/function/test/Jamfile, libs/function/test/contains_test.cpp:
  - Test contains() and equality comparison operators


[SVN r21844]
2004-01-20 18:02:02 +00:00
Douglas Gregor
44e986afe3 Switch over to the new enable_if library
[SVN r21143]
2003-12-04 22:31:09 +00:00
Douglas Gregor
8c8f072d09 Update license to the new Boost license (yay!)
[SVN r20235]
2003-10-01 04:10:37 +00:00
Douglas Gregor
fad40732a9 function_template.hpp: Works around an annoying bug in one of Apple's
3.3 compilers.


[SVN r20233]
2003-10-01 03:40:35 +00:00
Douglas Gregor
66cd32b565 NULL pointers can be of any integral type, not just int (Howard Hinnant)
[SVN r19989]
2003-09-10 04:16:17 +00:00
Douglas Gregor
40c9bb204e Me commit bad code
[SVN r19195]
2003-07-18 16:18:16 +00:00
Douglas Gregor
1ef5f459e2 sig needs to be a friend of functionN
[SVN r19174]
2003-07-18 03:48:17 +00:00
Douglas Gregor
2c8fc1b31f add macro BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
[SVN r19056]
2003-07-11 16:00:29 +00:00
Douglas Gregor
6ac619c12b Lots o' copyright statements
[SVN r17265]
2003-02-07 14:03:37 +00:00
Douglas Gregor
450959d0d7 Use boost/assert.hpp to check (at runtime) if the int passed to Boost.Function's
clearing constructor is zero


[SVN r16614]
2002-12-15 14:54:32 +00:00
Douglas Gregor
da9d12d1b9 function_template.hpp:
- When enable_if is not supported, supply an int version of the constructor
    and assignment operator so that the '= 0' or construct-with-0 syntax is
    usable


[SVN r16613]
2002-12-15 14:51:16 +00:00
Dave Abrahams
4cc84aff24 Disable function-type partial specializations for SunPro
[SVN r16512]
2002-12-04 15:55:34 +00:00
Douglas Gregor
f54bd9f08d function_template.hpp:
- Wrap ICEs in parentheses when used as template arguments


[SVN r16225]
2002-11-13 18:03:55 +00:00
Douglas Gregor
7baa23912d Fix on BCC 5.6.1 (Hugo Duncan)
[SVN r16216]
2002-11-12 22:36:29 +00:00
Douglas Gregor
17b311cbbd Support assignment from 0, construction from 0, and comparison to zero.
[SVN r16174]
2002-11-09 16:02:47 +00:00