Jayant Chowdharylearningtech.hashnode.dev·Nov 10, 2023C++: What are constexpr and constinit ?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...2 likes·44 readsCpp Tutorial
Subrat Kumar Swaincppwithsubrat.hashnode.dev·May 5, 2023Understanding C++ NamespacesAppropriate 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 ...84 readsModern C++cpp
qilingzhaoqilingzhao.com·Jul 9, 2022C++智能指针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<...51 readsC++