PrintLn header for C++
Have you looked at C++20 osyncstream?  It seems to have a better interface.

Multithreading

std::lock_guard&lt;std::mutex&gt;(PrintLn&lt;Stream&gt;::m);


This line is useless, because temporary objects are destroyed at the end of the full-expression.  (Does this even have a temporary in C++17?)  You need a named variable instead.  Also make use of class template argument deduction:

std::lock_guard lock{m};


Also,

Streams

Your approach is unnecessarily restricted because only three hardcoded streams std::cout, std::cerr, and std::clog are supported.  And I think {} is OK and these don't really help a lot:

#define CoutLn CoutLn{}
#define CerrLn CerrLn{}
#define ClogLn ClogLn{}


Make the function object have regular semantics instead.  You may use a hash map internally to store the mutexes, as syncbuf does.

Also SFINAE on operator&lt;&lt;.



Here's the same thing implemented with osyncstream:

template &lt;
    class CharT,
    class Traits = std::char_traits&lt;CharT&gt;,
    class Allocator = std::allocator&lt;CharT&gt;
&gt; class PrintLn : public std::basic_osyncstream&lt;CharT, Traits, Allocator&gt; {
    using Base = std::basic_osyncstream&lt;CharT, Traits, Allocator&gt;;
public:
    using Base::Base;

    PrintLn(PrintLn&amp;&amp;) = default;
    PrintLn&amp; operator=(PrintLn&amp;&amp;) = default;
    ~PrintLn()
    {
        if (this-&gt;get_wrapped()) {
            *static_cast&lt;Base*&gt;(this) &lt;&lt; '\n';
        }
    }
};

inline auto cout_ln()
{
    return PrintLn{std::cout};
}
inline auto cerr_ln()
{
    return PrintLn{std::cerr};
}
inline auto clog_ln()
{
    return PrintLn{std::clog};
}


But anyway, why would you wanna do this when you can simply print a \n?