mirror of
https://github.com/boostorg/local_function.git
synced 2026-01-23 17:52:08 +00:00
Reworked all LocalFunction tests and examples to use Boost.Detail/LightweightTest (instead of Boost.Test) and test sequence syntax without variadic macros (..._nova tests).
[SVN r77747]
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
struct n {
|
||||
int i;
|
||||
n(int _i): i(_i) {}
|
||||
n(n const& x): i(x.i) { // Some time consuming copy.
|
||||
n(n const& x): i(x.i) { // Some time consuming copy operation.
|
||||
for (unsigned i = 0; i < 10000; ++i) std::cout << '.';
|
||||
}
|
||||
};
|
||||
@@ -21,8 +21,8 @@ struct n {
|
||||
int main(void) {
|
||||
n x(-1);
|
||||
|
||||
void BOOST_LOCAL_FUNCTION(const bind& x) { // OK: No copy
|
||||
assert( x.i == -1 ); // and constant.
|
||||
void BOOST_LOCAL_FUNCTION(const bind& x) { // OK: No copy expensive
|
||||
assert(x.i == -1); // copy but constant.
|
||||
} BOOST_LOCAL_FUNCTION_NAME(f)
|
||||
f();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user