#include <iostream>
#include <string>
using namespace std;

int main() {
	cout << "sizeof(string): " << sizeof(string) << endl;
	
	string sso{"hello"};
	cout << "    SSO offset: " << (uintptr_t)sso.data() - (uintptr_t)&sso << endl;

	string non_sso{"some very long heap-allocated string"};
	cout << "Non-SSO offset: " << (uintptr_t)non_sso.data() - (uintptr_t)&non_sso << endl;
	return 0;
}