@cella-lang/cpp 0.1.202611080136 → 0.1.202611080524

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 (50) hide show
  1. package/CHANGES.md +12 -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.staticmembers.cell +0 -0
  46. package/cpp.streams.cell +0 -0
  47. package/cpp.templates.cell +0 -0
  48. package/cpp.userconversions.cell +0 -0
  49. package/index.json +1256 -1107
  50. package/package.json +7 -5
package/CHANGES.md CHANGED
@@ -5,6 +5,18 @@
5
5
 
6
6
  ## 未發佈
7
7
 
8
+ - **之前判 reject(this construct is not part of C++)、現在判 accept**:`std::swap<T>(a, b)`(寫明樣板引數)。T 寫明時兩個引數
9
+ 要是 T 的左值,或兩個同長度的 T 陣列(陣列的多載,`swap<int>(p, q)`);交換和 `std::swap(a, b)` 相同。`swap<long>(int, int)`、
10
+ `swap<const int>` 判 reject(no matching std::swap);參考或兩個以上的樣板引數判 unknown。semorphe 照舊送 `eCallT`。
11
+ - **新增 `std::numeric_limits`**(`<limits>`,[numeric.limits]):`min()`、`max()`、`lowest()`、`epsilon()`;bool、char(有沒有號照平台)、
12
+ signed/unsigned char、short、int、long、long long 與無號的版本由型別的大小算,float、double 是 IEEE 754 的值;其他型別照主樣板
13
+ 是 `T()`;long double 判 unknown。呼叫用語意樹的新形狀 **`eStaticCall`**(見 `@cella-lang/cfamily`;**待 semorphe 同意**):
14
+ `{"k": "eStaticCall", "n": …, "owner": {"k": "tTemplate", "name": "std::numeric_limits", "args": [{"k": "tInt"}]}, "f": "max", "args": []}`。
15
+ 程式自己的樣板類別的靜態成員函式也用它(`Box<int>::make()`);類別寫成 tClass 時和 `eCall "C::f"` 相同。
16
+ - **新增 `std::ostream_iterator`**(`<iterator>`,[ostream.iterator]):`copy(v.begin(), v.end(), ostream_iterator<int>(cout, " "))`;
17
+ 指派寫出值(有分隔字串時接著寫它),`*`、`++`、`it++` 不動。`cout` 當運算元(`eConst "cout"`,綁到 `std::ostream &`)是標準輸出的
18
+ 那一個物件。只寫到 cout。
19
+
8
20
  - **之前判 unknown(orderUncompared,why=access)、現在判 accept**:`std::to_string` 旁邊讀成員或經指標的值
9
21
  (`return to_string(re) + (im < 0 ? "-" : "+") + to_string(im < 0 ? -im : im) + "i";`,re、im 是成員)。to_string 的本體只用
10
22
  snprintf 寫自己的區域陣列,之前被算成「寫別處」。程式自己的函式用 snprintf、memcpy、strcpy 寫自己的區域陣列也一樣。真的寫到
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
package/cpp.streams.cell CHANGED
Binary file
Binary file
Binary file