Skip to content

Different deduction guides in paper and implementation of indirect #497

@Ukilele

Description

@Ukilele

Hey, I just realized that the deduction guides described in the proposal D3019R12 are different from the ones in the implementation of indirect.

Proposal:

template <class Value>
indirect(Value) -> indirect<Value>;

template <class Allocator, class Value>
indirect(allocator_arg_t, Allocator, Value) -> indirect<Value,
         typename allocator_traits<Allocator>::template rebind_alloc<Value>>;

Implementation

template <typename Value>
indirect(Value) -> indirect<Value>;

template <typename Value>
indirect(std::in_place_t, Value) -> indirect<Value>;

template <typename Alloc, typename Value>
indirect(std::allocator_arg_t, Alloc, std::in_place_t, Value) -> indirect<
    Value, typename std::allocator_traits<Alloc>::template rebind_alloc<Value>>;

Not sure what the right solution here is, but I at least wanted to report it asap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions