From b482c439289f898514e26eeba20564fb3ebf1370 Mon Sep 17 00:00:00 2001
From: Peter Dimov Inappropriate use of bind(f, ...)
Inappropriate use of bind<R>(f, ...)
Binding a nonstandard function
+const in signatures
MSVC specific: using boost::bind;
MSVC specific: class templates shadow function templates
-MSVC specific: const in signatures
MSVC specific: ... in signatures treated as type
Interface
@@ -608,7 +608,7 @@ The error is usually reported in bind.hpp, at a line similar to:
- A2 operator[] (arg<2>) const { return a2_; } + return f(a[a1_]);
@@ -651,6 +651,26 @@ syntax for functions and member function pointers. (to be written)
++Some compilers, including MSVC 6.0 and Borland C++ 5.5.1, have problems +with the top-level const in function signatures: +
+ ++int f(int const); + +int main() +{ + boost::bind(f, 1); // error +} ++ +
+Workaround: remove the const qualifier from the argument. +
+@@ -683,25 +703,6 @@ its author/maintainer. The other option is use the BOOST_BIND macro to rename bind.
--MSVC 6.0 has problems with const in function signatures: -
- --int f(int const); - -int main() -{ - boost::bind(f, 1); // error -} -- -
-Workaround: remove the const qualifier from the argument. -
-