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]
This commit is contained in:
Douglas Gregor
2001-07-14 19:34:14 +00:00
parent 131ed15e59
commit 3ba640809b
3 changed files with 44 additions and 22 deletions

View File

@ -397,8 +397,15 @@ namespace boost {
inline void postcall(const function_base*) {}
};
// The default function mixin costs nothing
struct empty_function_mixin {};
// The default function mixin does nothing. The assignment and copy-construction operators
// are all defined because MSVC defines broken versions.
struct empty_function_mixin {
empty_function_mixin() {};
empty_function_mixin(const empty_function_mixin&) {};
empty_function_mixin& operator=(const empty_function_mixin&)
{return *this; }
};
}
#endif // BOOST_FUNCTION_BASE_HEADER