File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 878
878
\begin {itemdescr }
879
879
\pnum
880
880
\mandates
881
- \tcode {T} is an implicit-lifetime type\iref {basic.types.general }.
881
+ \tcode {T} is an implicit-lifetime type\iref {basic.types.general }
882
+ and not an incomplete type.
882
883
883
884
\pnum
884
885
\expects
927
928
\end {itemdecl }
928
929
929
930
\begin {itemdescr }
931
+ \pnum
932
+ \mandates
933
+ \tcode {T} is a complete type.
934
+
930
935
\pnum
931
936
\expects
932
- \tcode {n > 0} is \tcode {true}.
937
+ \tcode {p} is suitably aligned for an array of \tcode {T} or is null.
938
+ \tcode {n <= size_t(-1) / sizeof(T)} is \tcode {true}.
939
+ \range {(char*)p}{(char*)p + (n * sizeof(T))} denotes
940
+ a region of allocated storage that is
941
+ a subset of the region of storage
942
+ reachable through\iref {basic.compound } \tcode {p}.
933
943
934
944
\pnum
935
945
\effects
936
- Equivalent to:
937
- \tcode {return *start_lifetime_as<U>(p);}
946
+ If \tcode {n > 0} is \tcode {true},
947
+ equivalent to
948
+ \tcode {start_lifetime_as<U>(p)}
938
949
where \tcode {U} is the type `` array of \tcode {n} \tcode {T}'' .
950
+ Otherwise, there are no effects.
951
+
952
+ \pnum
953
+ \returns
954
+ A pointer to the first element of the array,
955
+ if any;
956
+ otherwise,
957
+ a pointer that compares equal to \tcode {p}\iref {expr.eq }.
939
958
\end {itemdescr }
940
959
941
960
\rSec 2[allocator.tag]{Allocator argument tag}
You can’t perform that action at this time.
0 commit comments