diff --git a/inc/Logger.hpp b/inc/Logger.hpp index ec0e41428b42a2bfee5e85f8a234ace1ad6a189d..96c2101f84aeefb375400cfa0dbd54bc34f6b7e0 100644 --- a/inc/Logger.hpp +++ b/inc/Logger.hpp @@ -111,16 +111,17 @@ public: * * @tparam T The type of value to append * @param value The new value to add + * @todo See if noexcept can be added here without triggering warnings * @return The current Logger::LogEntry where the value has been appended */ template <class T> - Logger::LogEntry& operator<<(const T value) noexcept { + Logger::LogEntry& operator<<(const T value) { etl::to_string(value, message, format, true); return *this; } - Logger::LogEntry& operator<<(const std::string& value) noexcept; + Logger::LogEntry& operator<<(const std::string& value); }; /** diff --git a/src/Logger.cpp b/src/Logger.cpp index 65584a94db8d744d8664f92ed10b0e3cd8944005..76e36d59af7a58a5b9c34cd9fa3aca3592fee4b1 100644 --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -4,14 +4,14 @@ etl::format_spec Logger::format; // Reimplementation of the function for variable C strings template <> -Logger::LogEntry& Logger::LogEntry::operator<<(char* value) noexcept { +Logger::LogEntry& Logger::LogEntry::operator<<(char* value) { message.append(value); return *this; } // Reimplementation of the function for C strings template <> -Logger::LogEntry& Logger::LogEntry::operator<<(const char* value) noexcept { +Logger::LogEntry& Logger::LogEntry::operator<<(const char* value) { message.append(value); return *this; } diff --git a/src/Platform/x86/Logger.cpp b/src/Platform/x86/Logger.cpp index f5ec73d047e0f14dabac0cbd20167add4519e744..85d0797656a4831c718e5b64740eb977ddb98c1d 100644 --- a/src/Platform/x86/Logger.cpp +++ b/src/Platform/x86/Logger.cpp @@ -61,7 +61,7 @@ void Logger::log(Logger::LogLevel level, etl::istring & message) { // Reimplementation of the log function for C++ strings // This is kept in the Platform files, since we don't want to mess with std::strings in the microcontroller -Logger::LogEntry& Logger::LogEntry::operator<<(const std::string & value) noexcept { +Logger::LogEntry& Logger::LogEntry::operator<<(const std::string & value) { message.append(value.c_str()); return *this;