@cella-lang/cpp 0.1.202611140619 → 0.1.202611140703
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.
- package/CHANGES.md +10 -0
- package/cpp.arrays.cell +0 -0
- package/cpp.cell +0 -0
- package/cpp.classes.cell +0 -0
- package/cpp.classrules.cell +0 -0
- package/cpp.construction.cell +0 -0
- package/cpp.constructs.cell +0 -0
- package/cpp.copies.cell +0 -0
- package/cpp.exceptions.cell +0 -0
- package/cpp.friends.cell +0 -0
- package/cpp.inheritance.cell +0 -0
- package/cpp.lambdas.cell +0 -0
- package/cpp.layouts.cell +0 -0
- package/cpp.library.cell +0 -0
- package/cpp.memberpointers.cell +0 -0
- package/cpp.names.cell +0 -0
- package/cpp.objects.cell +0 -0
- package/cpp.operators.cell +0 -0
- package/cpp.overloading.cell +0 -0
- package/cpp.polymorphism.cell +0 -0
- package/cpp.primitives.cell +0 -0
- package/cpp.ranges.cell +0 -0
- package/cpp.references.cell +0 -0
- package/cpp.runtimetypes.cell +0 -0
- package/cpp.standardexceptions.cell +0 -0
- package/cpp.standardfunctions.cell +0 -0
- package/cpp.staticmembers.cell +0 -0
- package/cpp.streams.cell +0 -0
- package/cpp.templates.cell +0 -0
- package/cpp.userconversions.cell +0 -0
- package/index.json +590 -570
- package/package.json +6 -6
package/CHANGES.md
CHANGED
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
|
|
6
6
|
## 未發佈
|
|
7
7
|
|
|
8
|
+
- **`return x;` 的隱含移動只用在可隱含移動的變數**([class.copy.elision]p3):之前回傳任何不是全域的變數都當成移動,參照參數
|
|
9
|
+
回傳時移動建構子把呼叫者的物件搬空(`vector<int> f(vector<int>& v) { return v; }` 之後 `v` 是空的,接著讀 `v[i]` 被判成越界的
|
|
10
|
+
reject)。現在:區域物件與以值傳的參數照舊移動;右值參照(參數或區域變數,P1825,clang 與 GCC 在 C++17 也照這樣做)移動;
|
|
11
|
+
左值參照(參數或區域變數)、`const` 物件(含 `const T a` 參數)、成員、全域與函式內的 `static` 變數一律複製。函式內的 `static`
|
|
12
|
+
變數之前被當成可以直接交出去的區域物件(沒有複製),現在照全域變數複製。
|
|
13
|
+
從錯的 reject 變成 accept、輸出改成和 clang 一樣:上面幾種回傳加上移動建構子有印東西或會清空來源的類別。
|
|
14
|
+
**不相容**:`CppTables` 的欄位 `bodyOf` 換成 `definitionOf`(函式的整個定義,含參數;本體用 `FunctionDefinition.body` 取)。
|
|
15
|
+
新的 API:`Copies.isStaticLocal`、`Copies.isStatic`、`Copies.constParameter`、`Copies.movableType`、`Copies.implicitlyMovable`。
|
|
16
|
+
測試:`tests/cases/return_implicit_move/`(11 支,輸出對過 clang++ -std=c++17)。
|
|
17
|
+
|
|
8
18
|
- **double 與 long double 表示法相同的目標上,兩者照舊是不同的型別**([basic.fundamental]p12;用 `@cella-lang/cfamily` 新的
|
|
9
19
|
`FloatType`):從錯的 reject 變成 accept:`f(double)` 與 `f(long double)` 並存時的呼叫、`std::abs(double)`(ESP32、AVR 的目標上
|
|
10
20
|
「call to 'f' is ambiguous」);函式模板照型別分開實例(`viaF<double>` 與 `viaF<long double>`)。float 到 double 的提升
|
package/cpp.arrays.cell
CHANGED
|
Binary file
|
package/cpp.cell
CHANGED
|
Binary file
|
package/cpp.classes.cell
CHANGED
|
Binary file
|
package/cpp.classrules.cell
CHANGED
|
Binary file
|
package/cpp.construction.cell
CHANGED
|
Binary file
|
package/cpp.constructs.cell
CHANGED
|
Binary file
|
package/cpp.copies.cell
CHANGED
|
Binary file
|
package/cpp.exceptions.cell
CHANGED
|
Binary file
|
package/cpp.friends.cell
CHANGED
|
Binary file
|
package/cpp.inheritance.cell
CHANGED
|
Binary file
|
package/cpp.lambdas.cell
CHANGED
|
Binary file
|
package/cpp.layouts.cell
CHANGED
|
Binary file
|
package/cpp.library.cell
CHANGED
|
Binary file
|
package/cpp.memberpointers.cell
CHANGED
|
Binary file
|
package/cpp.names.cell
CHANGED
|
Binary file
|
package/cpp.objects.cell
CHANGED
|
Binary file
|
package/cpp.operators.cell
CHANGED
|
Binary file
|
package/cpp.overloading.cell
CHANGED
|
Binary file
|
package/cpp.polymorphism.cell
CHANGED
|
Binary file
|
package/cpp.primitives.cell
CHANGED
|
Binary file
|
package/cpp.ranges.cell
CHANGED
|
Binary file
|
package/cpp.references.cell
CHANGED
|
Binary file
|
package/cpp.runtimetypes.cell
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp.staticmembers.cell
CHANGED
|
Binary file
|
package/cpp.streams.cell
CHANGED
|
Binary file
|
package/cpp.templates.cell
CHANGED
|
Binary file
|
package/cpp.userconversions.cell
CHANGED
|
Binary file
|