aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-17 17:57:40 +0200
committerEugen Wissner <belka@caraus.de>2026-07-17 17:57:40 +0200
commit349e84c693c1444606e877f4d8cdc1a39aa91634 (patch)
treecd382dbac860cf8e78b8725a1c9b6ce9bc1fcd32 /include
parent4f260c5e98def6bd1b3498d4085de5080cca7641 (diff)
downloadelna-349e84c693c1444606e877f4d8cdc1a39aa91634.tar.gz
Reject const in const nesting
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/name_analysis.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/elna/boot/name_analysis.h b/include/elna/boot/name_analysis.h
index feef3bf..40bdf16 100644
--- a/include/elna/boot/name_analysis.h
+++ b/include/elna/boot/name_analysis.h
@@ -81,6 +81,18 @@ namespace elna::boot
};
/**
+ * Direct \c const \c const T is not valid — write it once.
+ * Merging through an alias is fine (C++ rule).
+ */
+ class double_const_error : public error
+ {
+ public:
+ explicit double_const_error(const source_position position);
+
+ std::string what() const override;
+ };
+
+ /**
* Origin of a field in a composite type.
*/
struct field_origin