Skip to content

Commit d84de54

Browse files
committed
add check for "constexpr friend"
1 parent bd2412c commit d84de54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/check-source.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ grep -ne '\bexplicit\b.*\bconstexpr\b' $texlib |
139139
grep -ne '\bconstexpr\b.*\sstatic\s' $texlib |
140140
fail 'constexpr static' || failed=1
141141

142+
# In library declarations, friend should not follow constexpr
143+
grep -ne '\bconstexpr\b.*\sfriend\s' $texlib |
144+
fail 'constexpr friend' || failed=1
145+
142146
# "Class" heading without namespace
143147
for f in $texlib; do
144148
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 |

0 commit comments

Comments
 (0)