... ne(wchar_t c1 st, wchar_t c2 nd) {
return towupper (c1 st) != towupper (c2 nd);
}
static bool lt(wchar_t c1 st, wchar_t c2 nd) {
return towupper (c1 st) < towupper (c2 nd);
}
static int compare(const ... max; //Track largest number
int current; // Current non-contained number
// Used in notContained()
// Find the next number not contained in the array
int notContained() {...
... objects. They are
admittedly simple, but you can use them to compose more complicated function objects.
Consequently, in many instances, you can construct complicated predicates without writing ... usemin2() {
std::cout << min(3.1,4 .2) << std::endl;
} ///:~
//: C0 5:MinMain.cpp
//{L} UseMin1 UseMin2 MinInstances
void usemin1();
void usemin2();
int main() {
usemin1();...
... combine the creation of the static object inside a member function with the
Singleton class. SingletonPattern.cpp can be modified to use this approach:
Comment
//: C1 0:SingletonPattern2.cpp
// ... successful because B2 is actually pointing to an Mi2 object, which contains a subobject of
type B1.
Casting to intermediate levels brings up an interesting difference between dynamic_cast and...
... ///:~
Incrementer now contains a CountedPtr object, which manages a Count. In main( ), the
CountedPtr objects are passed into the two Incrementer objects by value, so the copy-
constructor is called, ... <vector>
#include <cstdlib>
#include <ctime>
using namespace ZThread;
using namespace std;
class Count : public Cancelable {
FastMutex lock;
int count;
bool paused...