Hi there,
I got nothing outputted from the following sample code on page 360 to 362 of
the book "Beyond the C++ Standard". Did I missed something? Thanks in
advance.
Robert
==============
#include <iostream>
#include "boost/signals.hpp" // boost book, pp. 360 - 362
bool step0() {
std::cout << "Step 0 is OK.\n";
return true;
};
bool step1() {
std::cout << "Step 1 is not OK. This won't do at all. \n";
return false;
};
bool step2() {
std::cout << "Step 2 is OK. \n";
return true;
};
// we need this one as Combiner
class stop_on_failure {
public:
typedef bool result_type;
template<typename InputIterator>
bool operator()(InputIterator begin, InputIterator end) const {
while (begin != end); {
if (!*begin)
return false;
++begin;
}
return true;
}
};
int main() {
boost::signal