FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ExtractTypePack does not return a TypePack · Issue #26 · basicpp/basicpp17 · GitHub

ExtractTypePack does not return a TypePack #26

Description

I would expect these lines to compile:

static_assert(type_pack_index_of<int, decltype(extract_type_pack<TypePack<IndexType<23, int>>>)> == 0ul);
static_assert(type_pack_index_of<int, ExtractTypePack<TypePack<IndexType<23, int>>>> == 0ul);

But they don't. Because the results of extract_type_pack and ExtractTypePack are marked const and thus are not matched to the correct declaration of indexed_type_pack_index_of.

To check constness, compile this and see the warnings:

template<class... Ts>
struct [[deprecated]] print_types;

using A = print_types<ExtractTypePack<TypePack<IndexType<23, int>>>>;
using B = print_types<decltype(extract_type_pack<TypePack<IndexType<23, int>>>)>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL