Open vogt31337 opened 5 years ago
It's correct that this object shouldn't be copied around, as it owns resources in a simple raw pointer and implicit way. It's just luck that the const
is what's enforcing this for you (partially, as it blocks copy-assignment but not copy-construction). You should probably switch to using a pointer?
ssd1306 = new Adafruit_SSD1306(128, 32, &Wire);
Hmm sounds reasonable, I'll try it and if it works I'll close the issue.
Hi,
Problem: I tried using Adafruit_SSD1306 in a sub class to encapsulate it's behaviour. But Adafruit_GFX resists...
Versions: Arduino ver. 1.8.8 GFX ver. 1.3.6 SSD1306 ver. 1.2.9
Error:
Possible solution: Adafruit_GFX.h, line 132: Remove const.
What's happening? As far as I understood this explanation, you can't assign objects which have const fields in their definition. My C++ skill is too low to understand the details, but removeing the const expression solves this compilation.