boostorg / boostorg/hana

Provide a way of taking a specialization into a type list

Open
#67 3 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
1.9k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Specifically, it should be possible to have something similar to

``` cpp
template
struct T;

to_type_list(type>) == tuple_t
```

The exact semantics and name of this utility are still to determine. Here's a dump of something I had in my workspace:

``` cpp
#include
#include

template
constexpr auto untemplate = sizeof(Specialization) == 1 ? 1 : throw "hana::untemplate must be used with a specialization";

template class Template, typename ...T>
constexpr auto untemplate> = hana::tuple_t;

template
struct F;

int main() {
untemplate>;
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing boost/hana.hpp and the existing hana::tuple_t API, then examine the specialization example and the type_traits reference in the issue. The utility's exact semantics and name are explicitly unresolved, so completion requires agreeing on that design before a done condition can be defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.