Skip to content

Commit

Permalink
Applied template according to microsoftGH-2329
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingam committed Apr 20, 2024
1 parent c647911 commit 5a4dc42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion stl/inc/ostream
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ void println(ostream& _Ostr, const format_string<_Types...> _Fmt, _Types&&... _A
_STD _Print_impl(_Add_newline::_Yes, _Ostr, _Fmt, _STD forward<_Types>(_Args)...);
}

_EXPORT_STD inline void println(ostream& _Ostr) {
_EXPORT_STD template <int = 0> // improves throughput, see GH-2329
void println(ostream& _Ostr) {
_STD print(_Ostr, "\n");
}

Expand Down
6 changes: 4 additions & 2 deletions stl/inc/print
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ void println(FILE* const _Stream, const format_string<_Types...> _Fmt, _Types&&.
_STD _Print_impl(_Add_newline::_Yes, _Stream, _Fmt, _STD forward<_Types>(_Args)...);
}

_EXPORT_STD inline void println(FILE* _Stream) {
_EXPORT_STD template <int = 0> // improves throughput, see GH-2329
void println(FILE* _Stream) {
_STD print(_Stream, "\n");
}

_EXPORT_STD inline void println() {
_EXPORT_STD template <int = 0> // improves throughput, see GH-2329
void println() {
println(stdout);
}

Expand Down

0 comments on commit 5a4dc42

Please sign in to comment.