Changed nullptr to NULL to compile by older gcc versions