1.\" $NetBSD: operator.7,v 1.12 2017/07/03 21:30:59 wiz Exp $ 2.\" 3.\" Copyright (c) 1989, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 31.\" 32.Dd January 18, 2011 33.Dt OPERATOR 7 34.Os 35.Sh NAME 36.Nm operator 37.Nd C and C++ operator precedence and associativity 38.Sh DESCRIPTION 39.Bl -column -offset indent \ 40 ".Li \&! ~ ++ \-\- \- (type) * & sizeof new delete" \ 41 ".Sy Associativity" 42.\" 43.It Sy Operator \ 44 Ta Sy Associativity 45.\" 46.\" XXX: For some reason if anything but tab follows the last dot 47.\" XXX: the space before it is lost and we get ->. in the output. 48.\" XXX: My troff fu is weak, just work around with explicit \<space>. 49.It Li \&() [] \->\ \. \ 50 Ta left to right 51.\" 52.It Li \&! ~ ++ \-\- \- (type) * & sizeof new delete \ 53 Ta right to left 54.\" 55.It Li \&\->* .* \ 56 Ta left to right 57.\" 58.It Li \&* / % \ 59 Ta left to right 60.\" 61.It Li \&+ \- \ 62 Ta left to right 63.\" 64.It Li \&<< >> \ 65 Ta left to right 66.\" 67.It Li \&< <= > >= \ 68 Ta left to right 69.\" 70.It Li \&== != \ 71 Ta left to right 72.\" 73.It Li \&& \ 74 Ta left to right 75.\" 76.It Li \&^ \ 77 Ta left to right 78.\" 79.It Li \&| \ 80 Ta left to right 81.\" 82.It Li \&&& \ 83 Ta left to right 84.\" 85.It Li \&|| \ 86 Ta left to right 87.\" 88.It Li \&?: \ 89 Ta right to left 90.\" 91.It Li \&= += \-= *= /= %= <<= >>= &= ^= |= throw \ 92 Ta right to left 93.\" 94.It Li \&?: No (C++, third operand)\ 95 Ta right to left 96.\" 97.It Li \&, \ 98 Ta left to right 99.\" 100.El 101.Sh FILES 102.Bl -tag -width ".Pa /usr/share/misc/operator" -compact 103.It Pa /usr/share/misc/operator 104.El 105.Sh SEE ALSO 106.Xr iso646 3 107