Skip to content

Instantly share code, notes, and snippets.

@Themaister
Created June 15, 2012 13:24
Show Gist options
  • Save Themaister/2936450 to your computer and use it in GitHub Desktop.
Save Themaister/2936450 to your computer and use it in GitHub Desktop.
#include <stdint.h>
class Foo
{
public:
Foo() : data((const uint8_t* const&)m_data)
{
m_data = 0; // Set later in some other member function.
}
const uint8_t* const &data;
private:
uint8_t* m_data;
};
Foo* new_foo() { return new Foo; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment