stacktrace should add type alias pmr::stacktrace
Hiroaki Ando

Created on 2021-01-04.00:00:00 last changed 1 month ago


Date: 2021-03-12.14:31:50

Proposed resolution:

This wording is relative to N4878.

  1. Modify [stacktrace.syn], header <stacktrace> synopsis, as indicated:

    namespace std {
      // [stacktrace.entry], class stacktrace_entry
      class stacktrace_entry;
      // [stacktrace.basic], class template basic_stacktrace
      template<class Allocator>
      class basic_stacktrace;
      // basic_stacktrace typedef names
      using stacktrace = basic_stacktrace<allocator<stacktrace_entry>>;
      // [stacktrace.basic.hash], hash support
      template<class T> struct hash;
      template<> struct hash<stacktrace_entry>;
      template<class Allocator> struct hash<basic_stacktrace<Allocator>>;
      namespace pmr {
        using stacktrace = std::basic_stacktrace<polymorphic_allocator<stacktrace_entry>>;
Date: 2021-03-15.00:00:00

[ 2021-03-12; Reflector poll ]

Set priority to 3 and status to LEWG following reflector poll.

P2301 would resolve this.

Date: 2021-01-18.17:47:06

std::stacktrace is almost std::vector<stacktrace_entry>. This makes it an obvious candidate to define an alias for std::polymorphic_allocator.


It should be pointed out that a theoretically possible (additional) template alias

namespace pmr {
  template<class T>
    using basic_stacktrace = std::basic_stacktrace<polymorphic_allocator<T>>;

— albeit it would seem a natural choice when comparing with existing pmr typedef additions — would not provide any advantage for the user, because template parameter T would essentially need to be constrained to be equal to std::stacktrace_entry.

Date User Action Args
2021-03-12 14:31:50adminsetmessages: + msg11724
2021-03-12 14:31:50adminsetstatus: new -> lewg
2021-01-17 14:48:09adminsetmessages: + msg11661
2021-01-17 14:48:09adminsetmessages: + msg11660
2021-01-17 14:48:09adminrestored
2021-01-16 19:16:27adminretired
2021-01-16 19:16:27adminsetmessages: - msg11659
2021-01-04 00:00:00admincreate