Introduction to Constexpr - C++11 C++11 introduced a new specifier called constexpr. The reason for introducing constexpr was that many operations which were being performed at runtime, could be done at compile time - i.e. baked into code. This would...
Appropriate for individuals who... Preparing for C++ Interview. Passionate C++ developers revising C++ concepts. Syntax: namespace <name> { // can contain the followings... variable, structure, class, function, namespace etc... } Why is ...
std::unique_ptr 对于独占资源(exclusive-ownership resource)使用std::unique_ptr,它禁止和其他智能指针共享对象 使用 与std::shared_ptr只有单个对象形式不同, std::unique_ptr有两种形式, 对于单个对象(std::unique_ptr<T>), 对于数组(std::unique_ptr<T[]>), 对于解引用操作符(operator*和operator->)对于单个对象专有。 std::unique_ptr<...