DOC: eliminate spurious mentions of tr1::
This commit is contained in:
parent
7385b3f525
commit
ef74527f6b
13 changed files with 21 additions and 19 deletions
|
|
@ -48,7 +48,7 @@ The Boost library *functional-hash* provided the foundation for the definition n
|
|||
into the new C++ standard. Yet the boost library provides some additional facilities not
|
||||
part of the standard. Thus we're bound to choose
|
||||
|
||||
* either including +<tr1/functional>+ and +using std::tr1::hash+
|
||||
* either including +<functional>+ and +using std::hash+
|
||||
* or including +<boost/functional-hash>+ and +using boost::hash+
|
||||
|
||||
The boost version additionally provides pre defined hash functors for STL containers holding
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
** Collection of small helpers and utilities related to function objects.
|
||||
**
|
||||
** @todo combine with meta/function-closure.hpp and reorganise
|
||||
** @todo 2017 find out to what extent we still need that (looks obsolete)
|
||||
**
|
||||
** @see GuiSubsysDescriptor#start (guifacade.cpp)
|
||||
** @see MementoTie
|
||||
|
|
@ -72,7 +73,8 @@ namespace util { ////////////TODO: refactor namespace. But probably not directly
|
|||
* we use a conservative approach, by requiring
|
||||
* the concrete invoker, the storage manager and
|
||||
* the actual function and argument data pointers
|
||||
* to be the same.
|
||||
* to be the same.
|
||||
* @todo 2017 is this still necessary today?
|
||||
*/
|
||||
class HijackedFunction
|
||||
: std::_Function_base
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
** and the IDs denoting specific subclasses, such that the latter can stand-in
|
||||
** for the generic ID.
|
||||
** - providing a Mixin, which allows any hierarchy to use this facility without
|
||||
** much code duplication, including an adapter for tr1::unordered_map
|
||||
** much code duplication, including an adapter for std::unordered_map
|
||||
** - equality comparison
|
||||
**
|
||||
** @see HashIndexed_test
|
||||
|
|
@ -68,7 +68,7 @@ extern "C" {
|
|||
namespace lib {
|
||||
|
||||
/** Hash implementations usable for the HashIndexed mixin
|
||||
* as well as key within tr1::unordered_map */
|
||||
* as well as key within std::unordered_map */
|
||||
namespace hash {
|
||||
|
||||
/**
|
||||
|
|
@ -156,7 +156,7 @@ namespace lib {
|
|||
};
|
||||
|
||||
|
||||
/** enables use of BA objects as keys within tr1::unordered_map */
|
||||
/** enables use of BA objects as keys within std::unordered_map */
|
||||
struct UseEmbeddedHash
|
||||
: public std::unary_function<BA, HashVal>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ namespace idi {
|
|||
operator string() const;
|
||||
|
||||
|
||||
/** using BareEntryID derived objects as keys within tr1::unordered_map */
|
||||
/** using BareEntryID derived objects as keys within std::unordered_map */
|
||||
struct UseEmbeddedHash
|
||||
: public std::unary_function<BareEntryID, size_t>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ namespace func{
|
|||
/**
|
||||
* Closing a function over its arguments.
|
||||
* This is a small usage example or spin-off,
|
||||
* having almost the same effect than invoking tr1::bind.
|
||||
* having almost the same effect than invoking `std::bind()`.
|
||||
* The notable difference is that the function arguments for
|
||||
* creating the closure are passed in as one tuple compound.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
** storage for the concrete functor object, which might become problematic when
|
||||
** dealing with lots of functor objects.
|
||||
**
|
||||
** Especially when dealing with tr1::function objects, all of the type differences
|
||||
** Especially when dealing with std::function objects, all of the type differences
|
||||
** are actually encoded into 3 internal pointers, thus yielding the same size for
|
||||
** all various types of functors. Building on this observation, we can create an
|
||||
** common container object to store the varying functors inline, while hiding the
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ namespace lib {
|
|||
* a common interface; use this policy if the intention is
|
||||
* to use OpaqueHolder with a family of similar classes,
|
||||
* \em without requiring all of them to be derived from
|
||||
* a common base class. (E.g. tr1::function objects).
|
||||
* a common base class. (E.g. std::function objects).
|
||||
* In this case, the "Base" type will be defined to void*
|
||||
* As a consequence, we loose all type information and
|
||||
* no conversions are possible on re-access. You need
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace control {
|
|||
|
||||
/**
|
||||
* Unspecific command functor for implementing Proc-Layer Command.
|
||||
* To be created from an tr1::function object, which later on gets
|
||||
* To be created from an std::function object, which later on gets
|
||||
* any necessary arguments from a closure passed in on invocation.
|
||||
* The concrete type of the function and the arguments is
|
||||
* concealed (erased) on the interface.
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ namespace engine {
|
|||
* will be prepared on locking and cleanup will be invoked
|
||||
* automatically when releasing.
|
||||
* @warning comparison and hash values rely on internals of the
|
||||
* tr1::function implementation and might not be 100% accurate
|
||||
* std::function implementation and might not be 100% accurate
|
||||
*/
|
||||
struct TypeHandler
|
||||
{
|
||||
|
|
|
|||
|
|
@ -107,16 +107,16 @@ namespace test {
|
|||
UICoord targetLocation = locate;
|
||||
UICoord realView1 = alloc(targetLocation);
|
||||
CHECK (1 == allocCounter);
|
||||
CHECK (realView1 == UICoord::currentWindow().view("viewID").tab("1"));
|
||||
CHECK (realView1 == UICoord::currentWindow().view("viewID").tab(1));
|
||||
|
||||
UICoord realView2 = alloc(targetLocation);
|
||||
CHECK (2 == allocCounter);
|
||||
CHECK (realView2 == UICoord::currentWindow().view("viewID").tab("2"));
|
||||
CHECK (realView2 == UICoord::currentWindow().view("viewID").tab(2));
|
||||
CHECK (realView2 != realView1);
|
||||
|
||||
UICoord realView3 = alloc(targetLocation);
|
||||
CHECK (3 == allocCounter);
|
||||
CHECK (realView3 == UICoord::currentWindow().view("viewID").tab("3"));
|
||||
CHECK (realView3 == UICoord::currentWindow().view("viewID").tab(3));
|
||||
|
||||
UICoord realView3b = alloc(targetLocation);
|
||||
CHECK (3 == allocCounter);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
/** @file function-closure-test.cpp
|
||||
** Testing a combination of tr1::function objects and metaprogramming.
|
||||
** Testing a combination of std::function objects and metaprogramming.
|
||||
** Argument types will be extracted and represented as typelist, so they
|
||||
** can be manipulated at compile time. This test uses some test functions
|
||||
** and systematically applies or binds them to corresponding data tuples.
|
||||
|
|
|
|||
|
|
@ -178,14 +178,14 @@ namespace test {
|
|||
typedef Num<1> Sig123(Num<1>, Num<2>, Num<3>); // signature of the original function
|
||||
|
||||
typedef Num<1> Sig23(Num<2>, Num<3>); // signature after having closed over the first argument
|
||||
typedef function<Sig23> F23; // and a tr1::function object to hold such a function
|
||||
typedef function<Sig23> F23; // and a std::function object to hold such a function
|
||||
|
||||
Sig123& f =fun13<1,2,3>; // the actual input: a reference to the bare function
|
||||
|
||||
|
||||
// Version1: do a direct argument binding----------------- //
|
||||
|
||||
using PH1 = std::_Placeholder<1>; // tr1::function argument placeholders
|
||||
using PH1 = std::_Placeholder<1>; // std::function argument placeholders
|
||||
using PH2 = std::_Placeholder<2>;
|
||||
|
||||
PH1 ph1; // these empty structs are used to mark the arguments to be kept "open"
|
||||
|
|
@ -246,7 +246,7 @@ namespace test {
|
|||
|
||||
|
||||
// what follows is the real unit test...
|
||||
function<Sig123> func123 (f); // alternatively do it with an tr1::function object
|
||||
function<Sig123> func123 (f); // alternatively do it with an std::function object
|
||||
fun_23 = func::applyFirst (func123, Num<1>(19));
|
||||
res = fun_23 (_2_,_3_).o_;
|
||||
CHECK (24 == res);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ namespace test {
|
|||
typedef int (Sig4) ();
|
||||
|
||||
_sum_ = 0;
|
||||
f1.getFun<Sig1>() (-11,'M'); // invoke stored tr1::function...
|
||||
f1.getFun<Sig1>() (-11,'M'); // invoke stored std::function...
|
||||
CHECK (_sum_ == 'M'-11);
|
||||
|
||||
_sum_ = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue