#pragma once

// Dereference a pointer only if it is not null
#define ifnotnull(p) for (auto* p__ = p; p__ != nullptr; p__ = nullptr) (*p__)