diff --git a/tools/check-source.sh b/tools/check-source.sh index 0babcd2af8..d0e85036fb 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -139,6 +139,10 @@ grep -ne '\bexplicit\b.*\bconstexpr\b' $texlib | grep -ne '\bconstexpr\b.*\sstatic\s' $texlib | fail 'constexpr static' || failed=1 +# In library declarations, friend should not follow constexpr +grep -ne '\bconstexpr\b.*\sfriend\s' $texlib | + fail 'constexpr friend' || failed=1 + # "Class" heading without namespace for f in $texlib; do sed -n '/rSec[0-9].*{Class/,/\\end{codeblock}/{/\\begin{example}/,/\\end{example}/b;/\\begin{codeblock}/,/\(^namespace\)\|\(\\end{codeblock}\)/{s/template<[^>]*>//;/\(class\|struct\)[A-Za-z0-9_: ]*{/{=;p;};};}' $f |