Skip to content

Commit

Permalink
AK/Format: Fix incorrectly non-inlined variable templates
Browse files Browse the repository at this point in the history
Problem:
- Global variables (and variable templates) defined in header files
  need to be decorated `inline` to avoid multiple definition issues.

Solution:
- Put back the `inline` keyword which was erroneously removed.
  • Loading branch information
ldm5180 authored and awesomekling committed Apr 21, 2021
1 parent ece8aea commit 730fbfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AK/Format.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@ void dmesgln(CheckedFormatString<Parameters...>&& fmt, const Parameters&... para
#endif

template<typename T, typename = void>
constexpr bool HasFormatter = true;
inline constexpr bool HasFormatter = true;

template<typename T>
constexpr bool HasFormatter<T, typename Formatter<T>::__no_formatter_defined> = false;
inline constexpr bool HasFormatter<T, typename Formatter<T>::__no_formatter_defined> = false;

template<typename T>
class FormatIfSupported {
Expand Down

0 comments on commit 730fbfb

Please sign in to comment.