|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | +<html><head> |
| 3 | + <title>A Proposal to add stack trace library</title> |
| 4 | + <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> |
| 5 | + <meta http-equiv="Content-Language" content="en-us"> |
| 6 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 7 | + |
| 8 | + <style type="text/css"> |
| 9 | + .addition { color: green; } |
| 10 | + .right { float:right; } |
| 11 | + .changed-deleted { background-color: #CFF0FC ; text-decoration: line-through; display: none; } |
| 12 | + .addition.changed-deleted { color: green; background-color: #CFF0FC ; text-decoration: line-through; text-decoration: black double line-through; display: none; } |
| 13 | + .changed-added { background-color: #CFF0FC ;} |
| 14 | + .notes { background-color: #80D080 ;} |
| 15 | + pre { line-height: 1.2; font-size: 10pt; margin-top: 25px; } |
| 16 | + .desc { margin-left: 35px; margin-top: 10px; padding:0; white-space: normal; } |
| 17 | + body {max-width: 1024px; margin-left: 25px;} |
| 18 | + .cppkeyword { color: blue; } |
| 19 | + .cppcomment { color: green; } |
| 20 | + .cppcomment > .cppkeyword{ color: green; } |
| 21 | + .cpptext { color: #2E8B57; } |
| 22 | + </style> |
| 23 | + </head> |
| 24 | + <body bgcolor="#ffffff"> |
| 25 | + <address>Document number: P???R0</address> |
| 26 | + <address>Project: Programming Language C++</address> |
| 27 | + <address>Audience: SG14 Library Evolution</address> |
| 28 | + <address> </address> |
| 29 | + <address>Alexey Gorgurov < <a href=" mailto:[email protected]" >[email protected]</a>>, < <a href=" mailto:[email protected]" >[email protected]</a>> </address> |
| 30 | + <address>Antony Polukhin < <a href=" mailto:[email protected]" >[email protected]</a>>, < <a href=" mailto:[email protected]" >[email protected]</a>> </address> |
| 31 | + <address> </address> |
| 32 | + <address>Date: 2017-10-03</address> |
| 33 | + <h1>A Proposal to add stack trace library</h1> |
| 34 | + |
| 35 | + <span class='changed-added'>Significant changes to <a href="http://github.com/leha-bot/cpp-stacktrace-proposal">P????R?</a> are marked with blue.</span> <button onclick="show_hide_deleted()">Show/Hide deleted lines from P????R?</button> |
| 36 | + <p class='notes'>Green lines are notes for the <b>editor</b> or for the <b>SG6</b> that must not be treated as part of the wording.</p> |
| 37 | + <h2>I. Introduction and Motivation</h2> |
| 38 | + <p>Current compilers can print a stack trace while debugging or crash dump for debugging purposes. The compiler's users also can get a stack trace via implementation-defined API. But there is no cross-platform solution (except Boost.Stacktrace on which this Proposal is based of).</p> |
| 39 | + <p>This is an attempt to solve the problem in a generic way on a library level and provide wording for thing being a standard de-facto on all compilers.</p> |
| 40 | + <p>A proof of concept implementation available at: <a href="https://github.com/boostorg/stacktrace">https://github.com/boostorg/stacktrace</a>.</p> |
| 41 | +<!-- |
| 42 | + NOTE: saved for example. |
| 43 | + <h2>II. Changelog</h2> |
| 44 | + <p>Differences with P????R0:</p> |
| 45 | + <ul> |
| 46 | + <li></li> |
| 47 | + </ul> |
| 48 | +
|
| 49 | +--> |
| 50 | + <h2>II. Proposed wording</h2> |
| 51 | + <p>X. Stacktrace library <span class="right">[stacktrace]</span></p> |
| 52 | + <p>X.1. General <span class="right">[stacktrace.general]</span></p> |
| 53 | + <p>X.2. Classes <span class="right">[stacktrace.classes]</span></p> |
| 54 | + <p>X.2.1. Header <stacktrace> <span class="right">[stacktrace.syn]</span></p> |
| 55 | + <p>X.2.2. Class template basic_stacktrace <span class="right">[basic.stacktrace]</span></p> |
| 56 | + <p>X.2.2.1. basic_stacktrace non-member functions <span class="right">[stacktrace.nonmembers]</span></p> |
| 57 | + <p>X.2.2.1.1. </p> |
| 58 | + <p>X.2.2. Header <stacktrace_fwd> <span class="right">[stacktrace.fwd]</span></p> |
| 59 | + <h2>III. Feature-testing macro</h2> |
| 60 | + <p>For the purposes of SG10 we recommend the feature-testing macro name <code>__cpp_lib_stacktrace</code>.</p> |
| 61 | + |
| 62 | + <script type="text/javascript"> |
| 63 | + function colorize_texts(texts) { |
| 64 | + for (var i = 0; i < texts.length; ++i) { |
| 65 | + var text = texts[i].innerHTML; |
| 66 | + text = text.replace(/namespace|enum|void|constexpr|extern|noexcept|bool|template|class |struct|auto|const|typename|explicit|public|private|operator|#include|inline| char|typedef|static_assert|static_cast|static/g,"<span class='cppkeyword'>$&<\/span>"); |
| 67 | + text = text.replace(/\/\/[\s\S]+?\n/g,"<span class='cppcomment'>$&<\/span>"); |
| 68 | + texts[i].innerHTML = text; |
| 69 | + } |
| 70 | + } |
| 71 | + |
| 72 | + colorize_texts(document.getElementsByTagName("pre")); |
| 73 | + colorize_texts(document.getElementsByTagName("code")); |
| 74 | + |
| 75 | + var show = false; |
| 76 | + function show_hide_deleted() { |
| 77 | + var to_change = document.getElementsByClassName('changed-deleted'); |
| 78 | + for (var i = 0; i < to_change.length; ++i) { |
| 79 | + to_change[i].style.display = (show ? 'block' : 'none'); |
| 80 | + } |
| 81 | + |
| 82 | + show = !show; |
| 83 | + } |
| 84 | + show_hide_deleted() |
| 85 | + </script> |
| 86 | +</body></html> |
0 commit comments