Comments (2)
Hi,
Thanks for the report. Would you be open to creating a PR? I agree with your comments here.
Regards,
Pranav
from tabulate.
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)
- Release 1.5 is backward incompatible HOT 1
- How to print std::vector<std::string> into a row? HOT 3
- How do I acheive this table formatting? HOT 1
- How do I initialize an n*m Table? HOT 1
- why it cannot run correctly in windows os? HOT 14
- Correct table filled area shape method
- Support Unicode box drawing
- std::locale::global is unsafe
- After using print_table function, stream style is not correct HOT 1
- Printing to stringstream and retaining formatting HOT 1
- How to add a row from a vector? HOT 2
- Option to not strip leading (or trailing) whitespace in line-wrapped text? HOT 1
- Add option to remove entire columns
- Tableau c++ graphique
- Combining live-refresh tabulate + indicators
- How to write black text when Color::black does not exist
- Nested tables, how to support different colors for different grids HOT 1
- How can i indent the table ? HOT 1
- Hitting some compilation errors (shadow variable, implicit cast) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabulate.