• Now I want to write:

    template<typename... Args>
    void print(std::ostream &stream, Args... to_print) {
    template<typename... Args>
    void print(Args... to_print) {
        return print(std::cout, std::forward<Args>(to_print) ...);
    print("123"); // ok
    print(std::cerr, "123"); // ok
    std::stringstream ss;
    print(ss, "123"); // BOOOOOOOOOM!
    Edited by Recolic Keghart
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment