Skip to content

Instantly share code, notes, and snippets.

View Cannedfood's full-sized avatar

Benno Straub Cannedfood

  • Arthrex GmbH
  • Munich/Germany
View GitHub Profile
@Cannedfood
Cannedfood / assimp.lua
Last active March 25, 2024 13:27
A premake5 script for building assimp
-- How to use:
-- 0. Get assimp from https://github.com/assimp/assimp
-- 1. Place this file next to the cloned assimp repository like this:
--
-- assimp.lua
-- assimp/
--
-- 2. Set up configuration headers
--
-- 2.1 Create a folder for configuration headers, I usually name it _config_headers/
@Cannedfood
Cannedfood / gist:34db3273dee298d8f4802cba26e063a8
Last active September 29, 2018 06:38
Important unit tests for your shared_ptr implementation:
- Self assignment: May accidentally destroy the shared_block in the assignment
shared<X> a = make_shared<X>();
a = a;
- Weak pointer in child: Depending on the implementation, could delete the control block twice.
struct Test {
weak<Test> self;
};
shared<Test> t = make_shared<Test>();
t->self = t;
# initialization file (not found)