| 920 | } |
| 921 | |
| 922 | void |
| 923 | testIssue113() |
| 924 | { |
| 925 | string_view s = |
| 926 | "\"\\r\\n section id='description'>\\r\\nAll mbers form the uncountable set " |
| 927 | "\\u211D. Among its subsets, relatively simple are the convex sets, each expressed " |
| 928 | "as a range between two real numbers <i>a</i> and <i>b</i> where <i>a</i> \\u2264 <i>" |
| 929 | "b</i>. There are actually four cases for the meaning of \\\"between\\\", depending " |
| 930 | "on open or closed boundary:\\r\\n\\r\\n<ul>\\r\\n <li>[<i>a</i>, <i>b</i>]: {<i>" |
| 931 | "x</i> | <i>a</i> \\u2264 <i>x</i> and <i>x</i> \\u2264 <i>b</i> }</li>\\r\\n <li>" |
| 932 | "(<i>a</i>, <i>b</i>): {<i>x</i> | <i>a</i> < <i>x</i> and <i>x</i> < <i>b</i> }" |
| 933 | "</li>\\r\\n <li>[<i>a</i>, <i>b</i>): {<i>x</i> | <i>a</i> \\u2264 <i>x</i> and " |
| 934 | "<i>x</i> < <i>b</i> }</li>\\r\\n <li>(<i>a</i>, <i>b</i>]: {<i>x</i> | <i>a</i> " |
| 935 | "< <i>x</i> and <i>x</i> \\u2264 <i>b</i> }</li>\\r\\n</ul>\\r\\n\\r\\nNote that " |
| 936 | "if <i>a</i> = <i>b</i>, of the four only [<i>a</i>, <i>a</i>] would be non-empty." |
| 937 | "\\r\\n\\r\\n<strong>Task</strong>\\r\\n\\r\\n<ul>\\r\\n <li>Devise a way to " |
| 938 | "represent any set of real numbers, for the definition of \\\"any\\\" in the " |
| 939 | "implementation notes below.</li>\\r\\n <li>Provide methods for these common " |
| 940 | "set operations (<i>x</i> is a real number; <i>A</i> and <i>B</i> are sets):</li>" |
| 941 | "\\r\\n <ul>\\r\\n <li>\\r\\n <i>x</i> \\u2208 <i>A</i>: determine if <i>" |
| 942 | "x</i> is an element of <i>A</i><br>\\r\\n example: 1 is in [1, 2), while 2, " |
| 943 | "3, ... are not.\\r\\n </li>\\r\\n <li>\\r\\n <i>A</i> \\u222A <i>B</i>: " |
| 944 | "union of <i>A</i> and <i>B</i>, i.e. {<i>x</i> | <i>x</i> \\u2208 <i>A</i> or <i>x" |
| 945 | "</i> \\u2208 <i>B</i>}<br>\\r\\n example: [0, 2) \\u222A (1, 3) = [0, 3); " |
| 946 | "[0, 1) \\u222A (2, 3] = well, [0, 1) \\u222A (2, 3]\\r\\n </li>\\r\\n <li>" |
| 947 | "\\r\\n <i>A</i> \\u2229 <i>B</i>: intersection of <i>A</i> and <i>B</i>, i.e. " |
| 948 | "{<i>x</i> | <i>x</i> \\u2208 <i>A</i> and <i>x</i> \\u2208 <i>B</i>}<br>\\r\\n " |
| 949 | "example: [0, 2) \\u2229 (1, 3) = (1, 2); [0, 1) \\u2229 (2, 3] = empty set\\r\\n " |
| 950 | "</li>\\r\\n <li>\\r\\n <i>A</i> - <i>B</i>: difference between <i>A</i> and " |
| 951 | "<i>B</i>, also written as <i>A</i> \\\\ <i>B</i>, i.e. {<i>x</i> | <i>x</i> \\u2208 " |
| 952 | "<i>A</i> and <i>x</i> \\u2209 <i>B</i>}<br>\\r\\n example: [0, 2) \\u2212 (1, " |
| 953 | "3) = [0, 1]\\r\\n </li>\\r\\n </ul>\\r\\n</ul>\\r\\n</section>\\r\\n\"\n"; |
| 954 | TEST_GOOD_ONE(s); |
| 955 | } |
| 956 | |
| 957 | class comment_parser |
| 958 | { |