Monthly Archives: January 2016

Named tuple for C++

named tuple for cpp

When I use std::pair or std::tuple I always feel sad about using std::get<> to get results. Because this is not so readable, not so maintainable and a bit ugly. Even when you use first/second it’s easy to forget what was first argument of std::pair and so on. When you use tuple to pass more than 3 arguments situation becomes even worse. New standard has nothing in box to solve this, but we can fix this writing our own solution using C++14.

At MeetingCPP 2015 conference I attended nice presentation by  and found great solution there – named tuple. After some playtime I made my own implementation draft which you can find in this post.

Continue reading