Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String conversion and I/O #3

Open
snsinfu opened this issue Mar 22, 2018 · 0 comments
Open

String conversion and I/O #3

snsinfu opened this issue Mar 22, 2018 · 0 comments

Comments

@snsinfu
Copy link
Owner

snsinfu commented Mar 22, 2018

String conversion and I/O via std::istream/ostream should be supported by default. Additional support of the fmt library would also be good.

The string representation should not contain dimensional information. That just clutters output. The formatting should be the same as that of the underlying number type. Vectors and points should simply be formatted as space-separated numbers:

dim::vector<double, dim::mech::force, 3> force{1.2, 3.4, 5.6};
std::cout << force << '\n'; // "1.2 3.4 5.6\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant