curlpp icon indicating copy to clipboard operation
curlpp copied to clipboard

Overloaded perator << doesn't work in user namespaces.

Open pikapi12321 opened this issue 4 years ago • 1 comments

Code below only works in golbally scoped functions, not in functions inside a namescope. std::cout << curlpp::options::Url("http://example.com");

If I move declaration std::ostream & operator<<(std::ostream & stream, const curlpp::options::Url & url); into namespace curlpp, the problem gets resolved.

pikapi12321 avatar Mar 15 '21 06:03 pikapi12321

Can you create a merge request?

On Mon, Mar 15, 2021, 07:03 JonnyChen @.***> wrote:

Code below only works in golbally scoped functions, not in functions inside a namescope. std::cout << curlpp::options::Url("http://example.com");

If I move declaration std::ostream & operator<<(std::ostream & stream, const curlpp::options::Url & url); into namespace curlpp, the problem gets resolved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpbarrette/curlpp/issues/118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARU4DIGP4WZK7F56SA3LLTDWPM5ANCNFSM4ZF4KNBA .

jpbarrette avatar Mar 15 '21 07:03 jpbarrette