mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add typed sprout::get
This commit is contained in:
parent
530bc92d0c
commit
84b6d5d994
9 changed files with 190 additions and 4 deletions
|
@ -193,6 +193,14 @@ namespace testspr {
|
|||
TESTSPR_ASSERT(sprout::tuples::get<0>(tup3) == 1);
|
||||
TESTSPR_ASSERT(sprout::tuples::get<1>(tup3) == 1.0);
|
||||
}
|
||||
// get
|
||||
TESTSPR_BOTH_ASSERT(sprout::tuples::get<int>(tup1) == 1);
|
||||
TESTSPR_BOTH_ASSERT(sprout::tuples::get<double>(tup1) == 1.0);
|
||||
{
|
||||
auto tup3 = tup1;
|
||||
TESTSPR_ASSERT(sprout::tuples::get<int>(tup3) == 1);
|
||||
TESTSPR_ASSERT(sprout::tuples::get<double>(tup3) == 1.0);
|
||||
}
|
||||
|
||||
// tuple_size
|
||||
TESTSPR_BOTH_ASSERT(sprout::tuples::tuple_size<decltype(tup1)>::value == 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue