

C++17 Library Papers for Cologne - meetingcpp
http://meetingcpp.com/index.php/br/items/c17-library-papers-for-cologne.html

======
TillE
erase_if sounds like a method I'd be happy to have in many languages, where
containers aren't safe to modify as you're iterating over them.

~~~
StephanTLavavej
My erase_if proposal was accepted for the Library Fundamentals v2 Technical
Specification and is therefore likely to get into C++17.

------
Lich
I'm so behind on my C++ knowledge. I haven't even read up on smart pointers
yet.

~~~
static_noise
Smart pointers are pretty easy to use. They basically just delete the object
they are pointing to if they go out of scope.

You never have to worry about when and where to write "delete" again. What if
an exception occurs in your code? No worry, the smart pointer deletes the
object.

If you use a "shared pointer" you can duplicate the pointerand use it in other
functions and classes - the deletion happens when the last pointer object goes
out of scope.

Example:

{

    
    
       auto a = shared_ptr<T>( new T() );
    
     } // Now it gets deleted.
    

Another one:

{

    
    
      auto a = shared_ptr<T>( new T() );
    
      some_object.the_shared_ptr = a;  
    
      another_object.the_shared_ptr = a;
      
     } // Not yet, wait for the copies to get deleted.

------
blt
Where is the Ranges proposal?

~~~
meetingcpp
Eric Niebler is still working on it, see his last blogposts at
[http://ericniebler.com](http://ericniebler.com)

