Git Product home page Git Product logo

Comments (9)

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Could you provide an example of a problem code?

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Do you mean a custom operator<< ?

from plog.

DesktopMan avatar DesktopMan commented on August 12, 2024

yes, when I provide a custom operator<<.

std::ostream& operator<<(std::ostream& os, const Customer& customer)
{
    os << customer.id << " | " << customer.firstName << " | " << customer.lastName;
    return os;
}

I'm not seeing how I can make this cross platform compatible as the library is now. I tried using wide strings instead but PLOG_ENABLE_WCHAR_INPUT=1 doesn't build on Linux either?

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

I see. I'll take a look what can be done.

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Please, try a version from the ostream-operator-support branch and tell me how it works for you.

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Now plog should use any of std::ostream& operator<< or std::wostream& operator<<.

from plog.

DesktopMan avatar DesktopMan commented on August 12, 2024

I've tested the branch on Windows with MinGW64 6.1.0 and everything works as expected with my existing project using the file logger. Also tested on Linux.

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Excellent.

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 12, 2024

Merged to master.

from plog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.