Using call by reference in FocusSerial::send(...) and FocusSerial::sendRaw(...) causes linker errors due to undefined symbols if constexpr constants are passed to the methods. This is because if a constexpr value is bound to a reference this is the same as taking the address of the value. Thus, the compiler has to generate an instance. Some constants like e.g. FocusSerial::NEWLINE do not come with an instance. This seems not to cause problems with avr-gcc up to now but generates linker errors during virtual compiles with later gcc versions (e.g. gcc 8.3.0). This change does not incur any additional overhead as all version of FocusSerial's send methods are already inlined, and the templated versions root to the non-template versions of the send methods that only accept call-by-value anyway. Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>pull/729/head
parent
c864e78e94
commit
4c2e0a7635
Loading…
Reference in new issue