When including this library as a submodule for a multi-platform project, the scope guard fail to build on Gen2 devices since the scope_guard.h header was not included. It is getting included only by chance for Gen3. It's not included in Particle.h.
Solution
#include "scope_guard.h"
Alternatively the scope guard could be copied here since this is an undocumented internal Device OS define/service.
The issue is the same as the issue of CHECK macros.
Problem
When including this library as a submodule for a multi-platform project, the scope guard fail to build on Gen2 devices since the
scope_guard.h
header was not included. It is getting included only by chance for Gen3. It's not included in Particle.h.Solution
#include "scope_guard.h"
Alternatively the scope guard could be copied here since this is an undocumented internal Device OS define/service.The issue is the same as the issue of CHECK macros.