diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-04-08 20:20:19 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-04-08 20:20:19 +0000 |
commit | 11c39fb4a3fb60303b47021b590f6c8d7eaa1191 (patch) | |
tree | 28cc21dd0678c48fb669bfde7393019496eb8239 | |
parent | 2c97d32a81446ad703f924880be85b14f4719047 (diff) | |
download | src-11c39fb4a3fb60303b47021b590f6c8d7eaa1191.tar.gz src-11c39fb4a3fb60303b47021b590f6c8d7eaa1191.zip |
Add C++ operators to operator(7) manual page.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Notes
Notes:
svn path=/head/; revision=190855
-rw-r--r-- | share/man/man7/operator.7 | 12 | ||||
-rw-r--r-- | share/misc/operator | 36 |
2 files changed, 26 insertions, 22 deletions
diff --git a/share/man/man7/operator.7 b/share/man/man7/operator.7 index b092befa8ea9..e7c35cd13ab1 100644 --- a/share/man/man7/operator.7 +++ b/share/man/man7/operator.7 @@ -32,19 +32,20 @@ .\" @(#)operator.7 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd January 22, 2003 +.Dd April 8, 2009 .Dt OPERATOR 7 .Os .Sh NAME .Nm operator -.Nd C operator precedence and order of evaluation +.Nd C and C++ operator precedence and order of evaluation .Sh DESCRIPTION .Bd -ragged -offset indent -compact -.Bl -column "= += -= *= /= %= <<= >>= &= ^= |=" +.Bl -column "! ~ ++ -- - (type) * & sizeof new delete" .It Sy "Operator Associativity" .It "-------- -------------" .It "() [] -> . left to right" -.It "! ~ ++ -- - (type) * & sizeof right to left" +.It "! ~ ++ -- - (type) * & sizeof new delete right to left" +.It "->* .* left to right .It "* / % left to right" .It "+ - left to right" .It "<< >> left to right" @@ -56,7 +57,8 @@ .It "&& left to right" .It "|| left to right" .It "?: right to left" -.It "= += -= *= /= %= <<= >>= &= ^= |= right to left" +.It "= += -= *= /= %= <<= >>= &= ^= |= throw right to left" +.It "?: (C++, third operand) right to left" .It ", left to right" .El .Ed diff --git a/share/misc/operator b/share/misc/operator index b293f31da9b2..758737ba14f0 100644 --- a/share/misc/operator +++ b/share/misc/operator @@ -1,19 +1,21 @@ -Operator Associativity ------------------------------------------------------ -() [] -> . left to right -! ~ ++ -- - (type) * & sizeof right to left -* / % left to right -+ - left to right -<< >> left to right -< <= > >= left to right -== != left to right -& left to right -^ left to right -| left to right -&& left to right -|| left to right -?: right to left -= += -= *= /= %= <<= >>= &= ^= |= right to left -, left to right +Operator Associativity +------------------------------------------------------------- +() [] -> . left to right +! ~ ++ -- - (type) * & sizeof new delete right to left +->* .* left to right +* / % left to right ++ - left to right +<< >> left to right +< <= > >= left to right +== != left to right +& left to right +^ left to right +| left to right +&& left to right +|| left to right +?: right to left += += -= *= /= %= <<= >>= &= ^= |= throw right to left +?: (C++, third operand) right to left +, left to right $FreeBSD$ |