名前空間
変種
操作

std::modulus

提供: cppreference.com
< cpp‎ | utility‎ | functional
2013年7月2日 (火) 16:24時点におけるP12bot (トーク | 投稿記録)による版

 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (C++20)
(C++11)
関係演算子 (C++20で非推奨)
整数比較関数
(C++20)
スワップと型操作
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
一般的な語彙の型
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

初等文字列変換
(C++17)
(C++17)
 
関数オブジェクト
関数ラッパー
(C++11)
(C++11)
関数の部分適用
(C++20)
(C++11)
関数呼び出し
(C++17)
恒等関数オブジェクト
(C++20)
参照ラッパー
(C++11)(C++11)
演算子ラッパー
否定子
(C++17)
検索子
制約付き比較子
古いバインダとアダプタ
(C++17未満)
(C++17未満)
(C++17未満)
(C++17未満)
(C++17未満)(C++17未満)(C++17未満)(C++17未満)
(C++20未満)
(C++20未満)
(C++17未満)(C++17未満)
(C++17未満)(C++17未満)

(C++17未満)
(C++17未満)(C++17未満)(C++17未満)(C++17未満)
(C++20未満)
(C++20未満)
 
ヘッダ <functional> で定義
template< class T >
struct modulus;
部門の剰余を計算するための関数オブジェクト。タイプoperator%Tを実装しています.
Original:
Function object for computing remainders of divisions. Implements operator% for type T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

メンバータイプ

タイプ
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
result_type T
first_argument_type T
second_argument_type T

メンバ関数

operator()
第二引数で最初の引数の除算の剰余を返します
Original:
returns the remainder from the division of the first argument by the second argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数)

のstd ::モジュラス::
Original:
std::modulus::
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator()

T operator()( const T& lhs, const T& rhs ) const;

Returns the remainder of the division of lhs by rhs.

Parameters

lhs, rhs -
値を別つずつ分割する
Original:
values to divide one by another
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Return value

The result of lhs % rhs.

Exceptions

(none)

Possible implementation

T operator()(const T &lhs, const T &rhs) const 
{
    return lhs % rhs;
}