This popped up in cmake monolithic build once. It looks like BufferView is
included indirectly by some of the other headers (otherwise we would have seen
compile errors for other build configurations as well), bu I'll keep the
forward declaration since we don't want to depend on this indirect header
inclusion.
#include <string>
-class BufferView;
namespace lyx {
namespace frontend { class Painter; }
+class BufferView;
class Inset;
class MacroContext;