Monday, September 23, 2019

Modern Cpp features used

shared_ptr, unique_ptr, weak_ptr
auto


lambda

auto pred = [&] (const class &obj)
                   {
                       if(checks on the obj data)
                           return true/false;
                   };

soemthing::instance().process(pred);

std::make_tuple(params)

std::tie(3 variables) = [&] () {
                                                if(something) return make_tuple(3 variables)
                                                else if(soething else) return make_tuple(3 variables);
                                  };


Boost ::optional
Boost::none
boost::noncopyable
boost::static_pointer_castoldTypeVariable
boost::shared_ptr
boost::dynamic_pointer_castoldTypeVariable
boost::lexical_castoldTypeVariable - mostly used for numeric/alphabetic cast
inheriting from private boost::noncopyable

clang++ 1.0 is used.

No comments:

Post a Comment