From 349e84c693c1444606e877f4d8cdc1a39aa91634 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 17 Jul 2026 17:57:40 +0200 Subject: Reject const in const nesting --- include/elna/boot/name_analysis.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') 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 @@ -80,6 +80,18 @@ namespace elna::boot std::string what() const override; }; + /** + * 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. */ -- cgit v1.2.3