Skip to content

Releases: alexpolt/luple

Final Release

29 Oct 08:08
Compare
Choose a tag to compare

Polished and ready for use. Added as_nuple:

auto get_person( int id ) {
  return as_nuple( $name("key"), std::string{"John"}, $name("value"), id );
}
auto p = get_person(0);
std::cout << get<$("key")>( p ) << ", " << get<$("value")>( p );

Check out links to online samples.

Pre-Final

23 Oct 02:12
Compare
Choose a tag to compare

Added as_luple function (aka make_tuple). And a twin as_nuple which allows syntax:

    auto p = as_nuple( $name("key"), "some string", $name("value"), some value );
    std::cout << get<$("key")>( p ); //some string

Note $name(...) macros vs $(...) ( $(...) creates a type, $name(...) returns a value ).

Also added luple_tie() (aka std::tie). Added converting assigment and construction:

    luple< std::string > obj = as_luple( "Hello World" );

Lastly added swap ( using std::move ).

intern.h now defines N3599 by default which makes use of GCC and Clang extension, waiting for MSVC.

Remains to implement std::forward_as_tuple.

Looking to add C++17 template arg deduction for class templates and folding expression for luple_do.

1.0

13 Oct 07:43
Compare
Choose a tag to compare
1.0

Basically has all the features of std::tuple.

Remains to add are std::forward_as_tuple, std::tie, std::swap .