-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
For some technical reasons I had to replicate the functionality of std::tuple in my library. (see here: https://github.com/correaa/boost-multi?tab=readme-ov-file#formatting-fmt-pretty-printing)
I would be nice that the features in fmt would work on any type that has std::get<N>, std::tuple_size, etc. in their interface.
That is, if a type is tuple like then it could be printed as a tuple.
(This will also work on any class for which structured binding is implemented).
int main() {
std::tuple<int, int> t1(1, 2);
fmt::print( "{}", fmt::join(t1, "x") ); // prints 1 x 2
my_tuple<int, int> t2(1, 2);
fmt::print( "{}", fmt::join(t2, "x") ); // doesn't work now
}Here it is a godbolt example:
Reactions are currently unavailable