diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-17 17:36:59 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-17 17:36:59 +0200 |
| commit | 4f260c5e98def6bd1b3498d4085de5080cca7641 (patch) | |
| tree | 89f80e6ffba1aa7a89702e40a3010a43b4639c08 /include | |
| parent | e676e74efbbbf62887b9442326399eebccc4d108 (diff) | |
| download | elna-4f260c5e98def6bd1b3498d4085de5080cca7641.tar.gz | |
Disallow "[n] const T"
Diffstat (limited to 'include')
| -rw-r--r-- | include/elna/boot/name_analysis.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/elna/boot/name_analysis.h b/include/elna/boot/name_analysis.h index 4498d0c..feef3bf 100644 --- a/include/elna/boot/name_analysis.h +++ b/include/elna/boot/name_analysis.h @@ -40,16 +40,14 @@ namespace elna::boot local_export }; - private: - std::string identifier; - kind error_kind; - - public: - declaration_error(const kind error_kind, const boot::identifier& identifier); std::string what() const override; + + private: + std::string identifier; + kind error_kind; }; /** @@ -71,6 +69,18 @@ namespace elna::boot }; /** + * Array size before \c const is not valid — only \c const [n]T is + * accepted, not \c [n]const T. + */ + class const_array_error : public error + { + public: + explicit const_array_error(const source_position position); + + std::string what() const override; + }; + + /** * Origin of a field in a composite type. */ struct field_origin |
