[res.on.arguments]

# 16 Library introduction [[library]](./#library)

## 16.4 Library-wide requirements [[requirements]](requirements#res.on.arguments)

### 16.4.5 Constraints on programs [[constraints]](constraints#res.on.arguments)

#### 16.4.5.9 Function arguments [res.on.arguments]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3496)

Each of the following applies to all argumentsto functions defined in the C++ standard library, unless explicitly stated otherwise[.](#1.sentence-1)

- [(1.1)](#1.1)

  If an argument to a function has an invalid value (suchas a value outside the domain of the function or a pointer invalid for its
intended use), the behavior is undefined[.](#1.1.sentence-1)

- [(1.2)](#1.2)

  If a function argument is described as being an array,the pointer actually passed to the function shall have a value such that all
address computations and accesses to objects (that would be valid if the
pointer did point to the first element of such an array) are in fact valid[.](#1.2.sentence-1)

- [(1.3)](#1.3)

  If a function argument is bound to an rvalue reference parameter, the implementation may
assume that this parameter is a unique reference to this argument,
except that the argument passed to a move assignment operator may be
a reference to *this ([[lib.types.movedfrom]](lib.types.movedfrom "16.4.6.17 Moved-from state of library types"))[.](#1.3.sentence-1)
  [*Note [1](#note-1)*:
  If the type of a parameter is a forwarding reference ([[temp.deduct.call]](temp.deduct.call "13.10.3.2 Deducing template arguments from a function call"))
that is deduced to an lvalue reference type, then
the argument is not bound to an rvalue reference[.](#1.3.sentence-2)
 â *end note*]
  [*Note [2](#note-2)*:
  If a program casts
an lvalue to an xvalue while passing that lvalue to a library function
(e.g., by calling the function with the argument std​::​move(x)), the program
is effectively asking that function to treat that lvalue as a temporary object[.](#1.3.sentence-3)
  The implementation
is free to optimize away aliasing checks which would possibly be needed if the argument was
an lvalue[.](#1.3.sentence-4)
 â *end note*]
