2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-01 08:32:11 +00:00

[Searchable] Refactor the interface

- Rename elem to contains
- Rename subset to is_subset, and make is_subset applicable in infix notation
- Add the at_key method
- operator[] is now bound to at_key instead of find
This commit is contained in:
Louis Dionne
2015-05-04 10:42:48 -04:00
parent a9cf8bf9e7
commit 6ca6501278
22 changed files with 470 additions and 285 deletions

View File

@@ -13,7 +13,7 @@ using namespace boost::hana;
int main() {
BOOST_HANA_CONSTEXPR_LAMBDA auto xs = set(1, 2.2, 'x');
BOOST_HANA_CONSTEXPR_CHECK(elem(xs, 'x'));
constexpr auto xs = set(1, 2.2, 'x');
static_assert(contains(xs, 'x'), "");
}
//! [main]