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 60
60
$lastinclude = scalar (@file )+1;
61
61
}
62
62
63
- if (/ std::(cout|cerr)/ ) {
63
+ if (/ ( std::)? (cout|cerr)/ ) {
64
64
die " nested? [$file ]" if defined $output ;
65
65
$output = " " ;
66
66
}
72
72
$output =~ s / $le/ \n / g ;
73
73
74
74
my $level = 0;
75
- if ($output =~ / ^\s *\/\/\s *(std::(cout|cerr))/ ) {
75
+ if ($output =~ / ^\s *\/\/\s *(( std::)? (cout|cerr))/ ) {
76
76
$level = 3;
77
77
$output =~ s / ^\s *\/\/ // ;
78
78
$output =~ s /\n\s *\/\/ / \n / g ;
89
89
next;
90
90
}
91
91
92
- unless( $arr[0] =~ /^std::(cout|cerr)$/ ) {
92
+ unless( $arr[0] =~ /^( std::)? (cout|cerr)$/ ) {
93
93
die "std::(cerr|cout) expected [$file]: |" . $arr[0] . "|";
94
94
}
95
95
102
102
$arr[-1] = "std::endl;";
103
103
}
104
104
105
- if( $arr[-1] =~ /^std::flush;$/ &&
106
- $arr[-2] =~ /^std::endl$/ ) {
105
+ if( $arr[-1] =~ /^( std::)? flush;$/ &&
106
+ $arr[-2] =~ /^( std::)? endl$/ ) {
107
107
pop @arr;
108
108
pop @arr;
109
109
push @arr, "std::endl;";
110
110
}
111
111
112
- unless( $arr[-1] =~ /^std::endl;$/ ) {
112
+ unless( $arr[-1] =~ /^( std::)? endl;$/ ) {
113
113
die "std::endl; expected [$file]: |" . $arr[-1] . "|";
114
114
}
115
115
You can’t perform that action at this time.
0 commit comments