Coder Social home page Coder Social logo

Comments (2)

p-ranav avatar p-ranav commented on June 3, 2024

Hi,

Thanks for the report. Would you be open to creating a PR? I agree with your comments here.

Regards,
Pranav

from tabulate.

peterritter avatar peterritter commented on June 3, 2024

Hi,
I fixed it for myself in the 'single_include/tabulate.hpp' which is what I am using. I don't know what it looks like in the rest of the library. There may be other places that need fixing too in the non-amalgamated files. I also don't know what the interaction is with the 'nonstd' namespace - if that would create issues with that? I really just uncommented these and equivalent lines:

#if __cplusplus >= 201703L
#include <string_view>
#include
//using std::get_if;
//using std::holds_alternative;
//using std::string_view;
//using std::variant;
//using std::visit;
#else
// #include <tabulate/string_view_lite.hpp>
// #include <tabulate/variant_lite.hpp>
using nonstd::get_if;
using nonstd::holds_alternative;
using nonstd::string_view;
using nonstd::variant;
using nonstd::visit;
#endif

...and then added the 'std::' prefix where required.
Regards, Peter

PS: In practice, I realized that when populating large tables, it is not really practical to then iterate over the table again to set formating. It's really at the time of appending a cell to a row, that I would like to define the formating of the cell, as it is at that point that I know what the value type is. I tried quite hard to try to figure out how to format the cells in a row before appending a table. But i didn't quite manage to figure out how. If you ever get around to it that would be a good way to enhance the library.

from tabulate.

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.