Skip to content

Instantly share code, notes, and snippets.

View jwakely's full-sized avatar
👁️
Massive eye is watching you, but don't worry about it.

Jonathan Wakely jwakely

👁️
Massive eye is watching you, but don't worry about it.
View GitHub Profile
@dabrahams
dabrahams / private_access.cpp
Created December 28, 2011 17:50
Accessing Private Data
#include <iostream>
// This is a rewrite and analysis of the technique in this article:
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html
// ------- Framework -------
// The little library required to work this magic
// Generate a static data member of type Tag::type in which to store
// the address of a private member. It is crucial that Tag does not