- random[meta header]
- std[meta namespace]
- function template[meta id-type]
- cpp11[meta cpp]
namespace std {
template <class IntType>
bool operator!=(
const uniform_int_distribution<IntType>& a,
const uniform_int_distribution<IntType>& b);
}
非等値比較を行う。
!(a == b)
定数時間
#include <iostream>
#include <random>
int main()
{
std::uniform_int_distribution<> a(0, 3);
std::uniform_int_distribution<> b(0, 4);
if (a != b) {
std::cout << "not equal" << std::endl;
}
else {
std::cout << "equal" << std::endl;
}
}
not equal
- C++11
- Clang: ??
- GCC: 4.7.2 [mark verified]
- ICC: ??
- Visual C++: ??