Category: Cpp

0

Cpp/learn-Website

Resources online Complier example: cpp reflect C++ Insights: See your source code with the eyes of a compiler Quick C++ Benchmark online Code Browser

0

shared_ptr memory layout

Struct12345678910111213141516171819202122232425class __shared_ptr { element_type* _M_ptr; // Contained pointer. __shared_count<_Lp> _M_refcount; // Reference counter.

0

string memory layout

source12345678910111213141516171819202122232425262728// string.cpp#include <string>#include <iostream>void func(std::string &hello) { std::cout << hello.size(); std::c

0

tuple memory layout

Source123456789101112131415161718192021#include <map>#include <functional>#include <vector>#include <string>#include <iostream>template<typename... Args>void func

0

map memory layout

Source123456789101112131415161718#include <map>#include <iostream>void func(std::map<int, int> const &mapping) { for (auto &data : mapping) { std::cout &l

0

vector memory layout

Source1234567891011121314151617181920212223// vector.cpp#include <vector>#include <iostream>void func(std::vector<unsigned long> &datas) { for (auto &data : datas)

202