File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change 1312
1312
template<class T>
1313
1313
constexpr bool ispow2(T x) noexcept;
1314
1314
template<class T>
1315
- constexpr T ceil2(T x) noexcept ;
1315
+ constexpr T ceil2(T x);
1316
1316
template<class T>
1317
1317
constexpr T floor2(T x) noexcept;
1318
1318
template<class T>
1382
1382
\indexlibrary {\idxcode {ceil2}}%
1383
1383
\begin {itemdecl }
1384
1384
template<class T>
1385
- constexpr T ceil2(T x) noexcept ;
1385
+ constexpr T ceil2(T x);
1386
1386
\end {itemdecl }
1387
1387
1388
1388
\begin {itemdescr }
1389
+ \pnum
1390
+ Let $ N$ be the smallest power of 2 greater than or equal to \tcode {x}.
1391
+
1392
+ \pnum
1393
+ \constraints
1394
+ \tcode {T} is an unsigned integer type\iref {basic.fundamental }.
1395
+
1396
+ \pnum
1397
+ \expects
1398
+ $ N$ is representable as a value of type \tcode {T}.
1399
+
1389
1400
\pnum
1390
1401
\returns
1391
- The minimal value \tcode {y} such that
1392
- \tcode {ispow2(y)} is \tcode {true} and \tcode {y >= x};
1393
- if \tcode {y} is not representable as a value of type \tcode {T},
1394
- the result is an unspecified value.
1402
+ $ N$ .
1403
+
1404
+ \pnum
1405
+ \throws
1406
+ Nothing.
1395
1407
1396
1408
\pnum
1397
1409
\remarks
1398
- This function shall not participate in overload resolution
1399
- unless \tcode {T} is an unsigned integer type\iref {basic.fundamental }.
1410
+ A function call expression
1411
+ that violates the precondition in the \expects element
1412
+ is not a core constant expression\iref {expr.const }.
1400
1413
\end {itemdescr }
1401
1414
1402
1415
\indexlibrary {\idxcode {floor2}}%
You can’t perform that action at this time.
0 commit comments