X Tutup
The Wayback Machine - https://web.archive.org/web/20180310074444/http://ja.cppreference.com:80/w/cpp/types/is_unsigned
名前空間
変種
操作

std::is_unsigned

提供: cppreference.com
< cpp‎ | types

 
 
 
型サポート
型プロトタイプ
is_const(C++11)
is_volatile(C++11)
is_empty(C++11)
is_polymorphic(C++11)
is_final(C++14)
is_abstract(C++11)
is_aggregate(C++17)
is_trivial(C++11)
is_trivially_copyable(C++11)
is_standard_layout(C++11)
is_literal_type(C++11)(deprecated in C++17)
is_pod(C++11)(deprecated in C++20)
is_signed(C++11)
is_unsigned(C++11)
has_unique_object_representations(C++17)
型特性定数
integral_constant
bool_constant
true_type
false_type
(C++11)
(C++17)
(C++11)
(C++11)
メタ関数
conjunction(C++17)
disjunction(C++17)
negation(C++17)
エンディアン
endian(C++20)
サポートされている操作
is_constructible
is_trivially_constructible
is_nothrow_constructible
(C++11)
(C++11)
(C++11)
is_default_constructible
is_trivially_default_constructible
is_nothrow_default_constructible
(C++11)
(C++11)
(C++11)
is_copy_constructible
is_trivially_copy_constructible
is_nothrow_copy_constructible
(C++11)
(C++11)
(C++11)
is_move_constructible
is_trivially_move_constructible
is_nothrow_move_constructible
(C++11)
(C++11)
(C++11)
is_assignable
is_trivially_assignable
is_nothrow_assignable
(C++11)
(C++11)
(C++11)
is_copy_assignable
is_trivially_copy_assignable
is_nothrow_copy_assignable
(C++11)
(C++11)
(C++11)
is_move_assignable
is_trivially_move_assignable
is_nothrow_move_assignable
(C++11)
(C++11)
(C++11)
is_destructible
is_trivially_destructible
is_nothrow_destructible
(C++11)
(C++11)
(C++11)
has_virtual_destructor(C++11)
is_swappable_with
is_swappable
is_nothrow_swappable_with
is_nothrow_swappable
(C++17)
(C++17)
(C++17)
(C++17)
関係と性質の問い合わせ
is_same(C++11)
is_base_of(C++11)
is_convertible(C++11)
alignment_of(C++11)
rank(C++11)
extent(C++11)
is_invocable
is_invocable_r
is_nothrow_invocable
is_nothrow_invocable_r
(C++17)
(C++17)
(C++17)
(C++17)
型変更
remove_cv
remove_const
remove_volatile
(C++11)
(C++11)
(C++11)
add_cv
add_const
add_volatile
(C++11)
(C++11)
(C++11)
make_signed(C++11)
make_unsigned(C++11)
型変換
aligned_storage(C++11)
aligned_union(C++11)
decay(C++11)
remove_cvref(C++20)
enable_if(C++11)
void_t(C++17)
conditional(C++11)
common_type(C++11)
underlying_type(C++11)
result_of
invoke_result
(C++11)(deprecated in C++17)
(C++17)
 
ヘッダ <type_traits> で定義
template< class T >
struct is_unsigned;
(C++11およびそれ以降)
Tは符号なし算術型である場合、メンバーが一定提供value等しいtrueを。その他のタイプのために、valuefalseです.
Original:
If T is an unsigned arithmetic type, provides the member constant value equal true. For any other type, value is false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

std::integral_constant から継承

Member constants

value
[static]
true T is an unsigned arithmetic type もし、そうでなければfalse
Original:
true if T is an unsigned arithmetic type , false otherwise
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリック静的メンバ定数)

Member functions

operator bool
boolにオブジェクトは、value返しに変換します
Original:
converts the object to bool, returns value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

Member types

タイプ
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
value_type bool
type std::integral_constant<bool, value>

[編集]

#include <iostream>
#include <type_traits>
 
class A {};
enum B : unsigned {};
enum class C : unsigned {};
 
int main() 
{
    std::cout << std::boolalpha;
    std::cout << std::is_unsigned<A>::value << '\n';
    std::cout << std::is_unsigned<float>::value << '\n';
    std::cout << std::is_unsigned<signed int>::value << '\n';
    std::cout << std::is_unsigned<unsigned int>::value << '\n';
    std::cout << std::is_unsigned<B>::value << '\n';
    std::cout << std::is_unsigned<C>::value << '\n';
}

出力:

false
false
false
true
false
false

[編集] 参照

(C++11)
型が算術型を締結しているかどうかを確認する
Original:
checks if a type is signed arithmetic type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
タイプかどうかをチェックするには、浮動小数点型である
Original:
checks if a type is floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
タイプかどうかをチェックするには、整数型です
Original:
checks if a type is integral type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
与えられた整数型は符号付きになります
Original:
makes the given integral type signed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
与えられた整数型は符号なしになります
Original:
makes the given integral type unsigned
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
X Tutup