YSTest: optional.cpp 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

optional.cpp
浏览该文件的文档.
1 /*
2 © 2015, 2018, 2019 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #include "ystdex/optional.h"
29
30 namespace ystdex
31 {
32
33 #if YB_Has_optional != 1
34 inline namespace cpp2017
35 {
36
37 bad_optional_access::~bad_optional_access() = default;
38
39 const char*
40 bad_optional_access::what() const ynothrow
41 {
42 return "bad optional access";
43 }
44
45 } // inline namespace cpp2017;
46 #endif
47
48 } // namespace ystdex;
49
ystdex::cpp2017::bad_optional_access::~bad_optional_access
~bad_optional_access() override
ystdex::cpp2017::bad_optional_access::what
virtual const char * what() const override
Definition: optional.cpp:40
optional.h
可选值包装类型。
ystdex
<memory> 特性测试宏。
Definition: ydef.h:1262
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629
ynothrow
#define ynothrow
YSLib 无异常抛出保证：若支持 noexcept 关键字， 指定特定的 noexcept 异常规范。
Definition: ydef.h:1199