File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 6060 $lastinclude = scalar (@file )+1;
6161 }
6262
63- if (/ std::(cout|cerr)/ ) {
63+ if (/ ( std::)? (cout|cerr)/ ) {
6464 die " nested? [$file ]" if defined $output ;
6565 $output = " " ;
6666 }
7272 $output =~ s / $le/ \n / g ;
7373
7474 my $level = 0;
75- if ($output =~ / ^\s *\/\/\s *(std::(cout|cerr))/ ) {
75+ if ($output =~ / ^\s *\/\/\s *(( std::)? (cout|cerr))/ ) {
7676 $level = 3;
7777 $output =~ s / ^\s *\/\/ // ;
7878 $output =~ s /\n\s *\/\/ / \n / g ;
8989 next;
9090 }
9191
92- unless( $arr[0] =~ /^std::(cout|cerr)$/ ) {
92+ unless( $arr[0] =~ /^( std::)? (cout|cerr)$/ ) {
9393 die "std::(cerr|cout) expected [$file]: |" . $arr[0] . "|";
9494 }
9595
102102 $arr[-1] = "std::endl;";
103103 }
104104
105- if( $arr[-1] =~ /^std::flush;$/ &&
106- $arr[-2] =~ /^std::endl$/ ) {
105+ if( $arr[-1] =~ /^( std::)? flush;$/ &&
106+ $arr[-2] =~ /^( std::)? endl$/ ) {
107107 pop @arr;
108108 pop @arr;
109109 push @arr, "std::endl;";
110110 }
111111
112- unless( $arr[-1] =~ /^std::endl;$/ ) {
112+ unless( $arr[-1] =~ /^( std::)? endl;$/ ) {
113113 die "std::endl; expected [$file]: |" . $arr[-1] . "|";
114114 }
115115
You can’t perform that action at this time.
0 commit comments