C++ 異常庫 - out_of_range



描述

這是一個超出範圍的異常,標準庫的某些元件,例如 vector、deque、string 和 bitset 也會丟擲此型別的異常以指示引數超出範圍。

宣告

以下是 std::out_of_range 的宣告。

class out_of_range;

C++11

class out_of_range;

引數

返回值

異常

不丟擲異常保證 - 沒有成員丟擲異常。

成員

  • 建構函式 - what_arg 的內容與成員 what 返回的值相同。

  • what - 用於獲取標識異常的字串。

exception.htm
廣告
© . All rights reserved.