O''''Reilly Network For Information About''''s Book part 35 potx - Pdf 17

Function Objects and Higher-Order Programming
Boost.Bind

Bind is a generalization of the Standard Library binders, bind1st and bind2nd
.
The library supports binding arguments to anything that behaves like a
functionfunction pointers, function objects, and member function pointers with a
uniform syntax. It also enables functional composition by means of nested binders.
This library does not have all of the requirements that are imposed by the Standard
Library binders, most notably that there is often no need to provide the typedefs
result_type, first_argument_type, and second_argument_type
for your classes. This library also makes it unnecessary to use the adaptors
ptr_fun, mem_fun, and mem_fun_ref. The Bind library is thoroughly
covered in "Library 9: Bind 9." It's an important and very useful addition to the
C++ Standard Library. Bind is typically used with the Standard Library algorithms,
and is often used together with Boost.Function, yielding a powerful tool for s
toring
arbitrary functions and function objects for subsequent invocation. Bind has been
accepted for the upcoming Library Technical Report.
The author of Bind is Peter Dimov.
Boost.Function

The Function library implements a generalized callback mechanism.
It provides for
the storage and subsequent invocation of function pointers, function objects, and
member function pointers. Of course, it works with binder libraries such as
Boost.Bind and Boost.Lambda, which greatly increases the number of use cases
for

expensive or impossible to copy an object, or the state may be tied to a particular
instance, so copying is unwanted. In these situations, one needs a way to pass by
reference rather than by value. Ref wraps a reference to an object and turns it into
an object that may be copied. This permits calling functions taking their arguments
by value with a reference. Ref has been accepted for the upcoming Library
Technical Report.
The authors of Ref are Jaakko Järvi, Peter Dimov, Douglas Gregor, and David
Abrahams.
Boost.Signals

Signals and slots systems, based on a pattern also known as publisher-subscriber
and observer
, are important tools for managing events in a system with a minimum
of dependencies. Few large applications get by without some variation of this
powerful design pattern, though typically they use proprietary implementations.
Signals provides a proven and efficient means to decouple the emission of signals
(events/subjects) from the slots (subscribers/observers) that need notification of
those signals.
The author of Signals is Douglas Gregor.

Generic Programming and Template Metaprogramming
Boost.Call_traits

This library provides automatic deduction of the best way of passing arguments to
functions, based upon on the argument type. For example, when passing built-in
types such as int and double, it is most efficient to pass them by value. For
user-defined types, passing them by reference to const is generally preferable.

(substitution failure is not an error).
The authors of Enable_if are Jaakko Järvi, Jeremiah Willcock, and Andrew
Lumsdaine.
Boost.In_place_factory

The In_place_factory library is a framework for direct construction of contained
objects, including variadic argument lists for initialization. This can reduce the
typical requirement that contained types be CopyConstructible, and alleviates the
need to create unnecessary temporaries used only for the purpose of providing a
source object to be copied from. The library helps minimize the work needed to
forward the arguments used for initialization of the contained object.
The author of In_place_factory is Fernando Cacciola.
Boost.Mpl

Mpl is a library for template metaprogramming. It includes data structures and
algorithms that closely resemble those from the C++ Standard Library, but here
they are used at compile time. There is even support for compile-time lambda
expressions! Performing compile-time operations, such as generating types or
manipulating sequences of types, is increasingly common in modern C++, and a
library that offers such functionality is an extremely important tool. To the best of
my knowledge, there is nothing quite like the Mpl library in existence. It fills an
important void in the world of C++ metaprogramming. I should tell you that there's
a book for Boost.Mpl in the worksby the time you read this, it will be available.
C++ Template Metaprogramming is written by Aleksey Gurtovoy and David
Abrahams. You'll want to get your hands on that one as soon as possible!
The author of Mpl is Aleksey Gurtovoy, with important contributions from many
others.
Boost.Property_map

Property_map is a conceptual library rather than a concrete implementation. It

The authors of Type_traits are Steve Cleary, Beman Dawes, Aleksey Gurtovoy,
Howard Hinnant, Jesse Jones, Mat Marcus, John Maddock, and Jeremy Siek, with
contributions from many others.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status