Remove disallowed feature which Borland did not accept.
This commit is contained in:
parent
12cb0b868c
commit
c2af447d44
|
@ -73,28 +73,6 @@ The return value of ``find()`` must be assigned to an intermediate
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
Char Array to ``string`` Conversions with Algorithms
|
|
||||||
----------------------------------------------------
|
|
||||||
|
|
||||||
In some implementations, algorithms operating on iterators to a container of
|
|
||||||
``std::string`` can not accept a ``const char*`` value:
|
|
||||||
|
|
||||||
.. code-block:: c++
|
|
||||||
|
|
||||||
const char* dir = /*...*/;
|
|
||||||
std::vector<std::string> vec;
|
|
||||||
// ...
|
|
||||||
std::binary_search(vec.begin(), vec.end(), dir); // Wrong
|
|
||||||
|
|
||||||
The ``std::string`` may need to be explicitly constructed:
|
|
||||||
|
|
||||||
.. code-block:: c++
|
|
||||||
|
|
||||||
const char* dir = /*...*/;
|
|
||||||
std::vector<std::string> vec;
|
|
||||||
// ...
|
|
||||||
std::binary_search(vec.begin(), vec.end(), std::string(dir)); // Ok
|
|
||||||
|
|
||||||
std::auto_ptr
|
std::auto_ptr
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue