@cella-lang/cpp 0.1.202611090954 → 0.1.202611100309

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGES.md +17 -0
  2. package/cpp.arrays.cell +0 -0
  3. package/cpp.cell +0 -0
  4. package/cpp.classes.cell +0 -0
  5. package/cpp.classrules.cell +0 -0
  6. package/cpp.construction.cell +0 -0
  7. package/cpp.constructs.cell +0 -0
  8. package/cpp.copies.cell +0 -0
  9. package/cpp.exceptions.cell +0 -0
  10. package/cpp.inheritance.cell +0 -0
  11. package/cpp.lambdas.cell +0 -0
  12. package/cpp.layouts.cell +0 -0
  13. package/cpp.library.algorithms.cell +0 -0
  14. package/cpp.library.bitsets.cell +0 -0
  15. package/cpp.library.cell +0 -0
  16. package/cpp.library.comparisons.cell +0 -0
  17. package/cpp.library.deques.cell +0 -0
  18. package/cpp.library.iterators.cell +0 -0
  19. package/cpp.library.limits.cell +0 -0
  20. package/cpp.library.lists.cell +0 -0
  21. package/cpp.library.maps.cell +0 -0
  22. package/cpp.library.numerics.cell +0 -0
  23. package/cpp.library.pairs.cell +0 -0
  24. package/cpp.library.queues.cell +0 -0
  25. package/cpp.library.sets.cell +0 -0
  26. package/cpp.library.stacks.cell +0 -0
  27. package/cpp.library.streamiterators.cell +0 -0
  28. package/cpp.library.strings.cell +0 -0
  29. package/cpp.library.trees.cell +0 -0
  30. package/cpp.library.tuples.cell +0 -0
  31. package/cpp.library.unorderedmaps.cell +0 -0
  32. package/cpp.library.vectors.cell +0 -0
  33. package/cpp.memberpointers.cell +0 -0
  34. package/cpp.names.cell +0 -0
  35. package/cpp.objects.cell +0 -0
  36. package/cpp.operators.cell +0 -0
  37. package/cpp.overloading.cell +0 -0
  38. package/cpp.polymorphism.cell +0 -0
  39. package/cpp.primitives.cell +0 -0
  40. package/cpp.ranges.cell +0 -0
  41. package/cpp.references.cell +0 -0
  42. package/cpp.runtimetypes.cell +0 -0
  43. package/cpp.standardexceptions.cell +0 -0
  44. package/cpp.standardfunctions.cell +0 -0
  45. package/cpp.standardnames.cell +0 -0
  46. package/cpp.staticmembers.cell +0 -0
  47. package/cpp.streams.cell +0 -0
  48. package/cpp.templates.cell +0 -0
  49. package/cpp.userconversions.cell +0 -0
  50. package/index.json +299 -247
  51. package/package.json +6 -6
package/CHANGES.md CHANGED
@@ -5,6 +5,23 @@
5
5
 
6
6
  ## 未發佈
7
7
 
8
+ - **判決變快,判決與輸出不變**:標準串流當二元運算元的檢查(`Operators.streamMismatch`)只有運算元真的是串流時才解析運算子。之前
9
+ 每個二元運算式都先解析一次程式宣告的運算子函式,物件的運算子串接(`log << a << b`、`a + b + c`)每一層多檢查一份運算元,時間隨層數
10
+ 指數成長(一支十幾個運算子、串接 `<<` 的程式從約 7 秒變成約 60 秒)。
11
+ - **大括號指定**:`x = {a, b}` 走 `operator=(initializer_list)`([over.ass]、[over.ics.rank]p3.1),`x = {}` 也是(容量留著)。
12
+ 標準庫的 `vector`、`deque`、`set`、`multiset`、`map`、`unordered_map`、`string` 多了 `operator=(initializer_list)`;`map`、`unordered_map`、
13
+ `string` 多了 initializer_list 建構子;`initializer_list` 的標頭只要程式寫到大括號串列(指定、引數、回傳值,不只宣告)就載入。之前
14
+ `v = {1, 2}` 被當成 `vector(1, 2)`(一個元素,讀 `v[1]` 判 reject;`{3, 5}` 判 accept 但是三個 5),六個元素判 reject「no matching
15
+ constructor」。只有 initializer_list 建構子的類別改成移動指派(之前是複製指派);建構子是 explicit 時判 reject「no viable overloaded '='」。
16
+ - **之前判 reject、現在判 unknown 或 accept**:`f({1, 2})`(傳值參數)從「the expression is nested too deeply」改成 unknown;元素轉不過去時
17
+ initializer_list 建構子不可行、改走其他建構子([over.match.list]p1,`Construction.listAt`)。
18
+ - **`std::string::npos`**:程式有 string 類別時也是標頭的常數(之前判 reject「no member named 'npos' in 'std::string'」)。標準庫類別(`std::` 開頭)
19
+ 模型沒有的成員判 unknown,不判 reject(`StaticMembers.unmodeled`)。`string::size_type`、`vector<T>::size_type` 等容器的 `size_type` 有了。
20
+ - **vector、deque 的 `explicit` 建構子真的是 explicit**(**不相容**:轉換工具之前沒讀到 `explicit`,`vector(n)` 被當成轉換建構子)。
21
+ - 新的 API:`Construction.listAt`、`Construction.listFits`、`Construction.itemFits`、`Construction.listTaken`、`Overloading.assignedList`、
22
+ `Overloading.listAssignment`、`Overloading.classAssignment`、`Overloading.choosesExplicit`、`Braced.target`、`Braced.textForCharacters`、
23
+ `Library.bracedExpression`、`Library.stringMember`、`StaticMembers.unmodeled`。
24
+
8
25
  - **之前判 unknown、現在判 reject**:標準串流當二元運算子的運算元、而 std::ostream/std::istream 沒有那個運算子(學生把 `<<` 打成
9
26
  `<`:`cout < "Hello!";`、`int x; cin < x;`;`cout + x`、`x == cin`、`cerr < 1`),判 reject operandTypes,字照 clang:
10
27
  「invalid operands to binary expression ('ostream' (aka 'basic_ostream<char>') and 'const char[7]')」(另一邊的型別照寫的、陣列
package/cpp.arrays.cell CHANGED
Binary file
package/cpp.cell CHANGED
Binary file
package/cpp.classes.cell CHANGED
Binary file
Binary file
Binary file
Binary file
package/cpp.copies.cell CHANGED
Binary file
Binary file
Binary file
package/cpp.lambdas.cell CHANGED
Binary file
package/cpp.layouts.cell CHANGED
Binary file
Binary file
Binary file
package/cpp.library.cell CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/cpp.names.cell CHANGED
Binary file
package/cpp.objects.cell CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
package/cpp.ranges.cell CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/cpp.streams.cell CHANGED
Binary file
Binary file
Binary file