mirror of
https://github.com/boostorg/local_function.git
synced 2026-01-24 06:02:07 +00:00
Updated docs.
[SVN r77943]
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
//[operator_error
|
||||
struct point {
|
||||
int x;
|
||||
int y;
|
||||
@@ -23,16 +22,17 @@ struct point {
|
||||
BOOST_TYPEOF_REGISTER_TYPE(point) // Register for `NAME` below.
|
||||
|
||||
int main(void) {
|
||||
//[operator_error
|
||||
bool BOOST_LOCAL_FUNCTION(const point& p, const point& q) {
|
||||
return p.x == q.x && p.y == q.y;
|
||||
} BOOST_LOCAL_FUNCTION_NAME(operator==) // Error: Cannot use `operator...`.
|
||||
//]
|
||||
|
||||
point a; a.x = 1; a.y = 2;
|
||||
point b = a;
|
||||
BOOST_TEST(a == b);
|
||||
return boost::report_errors();
|
||||
}
|
||||
//]
|
||||
|
||||
#endif // VARIADIC_MACROS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user