CPP07 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
whatever.hpp ファイル

Contains template functions for basic operations like swap, min, and max. [詳解]

#include <iostream>
whatever.hpp の依存先関係図:
被依存関係図:

[ソースコード]

関数

template<typename T >
void swap (T &a, T &b)
 Swaps the values of two variables.
 
template<typename T >
T constmin (T const &a, T const &b)
 Returns the smaller of two values. If the values are equal, it returns the second value.
 
template<typename T >
T constmax (T const &a, T const &b)
 Returns the greater of two values. If the values are equal, it returns the second value.
 

詳解

Contains template functions for basic operations like swap, min, and max.

whatever.hpp に定義があります。

関数詳解

◆ max()

template<typename T >
T const & max ( T const a,
T const b 
)

Returns the greater of two values. If the values are equal, it returns the second value.

テンプレート引数
TThe type of the values to compare.
引数
aThe first value.
bThe second value.
戻り値
A const reference to the greater value.

whatever.hpp53 行目に定義があります。

◆ min()

template<typename T >
T const & min ( T const a,
T const b 
)

Returns the smaller of two values. If the values are equal, it returns the second value.

テンプレート引数
TThe type of the values to compare.
引数
aThe first value.
bThe second value.
戻り値
A const reference to the smaller value.

whatever.hpp43 行目に定義があります。

◆ swap()

template<typename T >
void swap ( T a,
T b 
)

Swaps the values of two variables.

テンプレート引数
TThe type of the variables.
引数
aThe first variable.
bThe second variable.

whatever.hpp29 行目に定義があります。