◆ optional_ptr() [1/5]
template<
class T , bool SAFE = true>
2459 : ptr(nullptr) {
2460 }
◆ optional_ptr() [2/5]
template<
class T , bool SAFE = true>
2461 : ptr(ptr_p) {
2462 }
◆ optional_ptr() [3/5]
template<
class T , bool SAFE = true>
2463 : ptr(&ref) {
2464 }
◆ optional_ptr() [4/5]
template<
class T , bool SAFE = true>
2465 : ptr(ptr_p.get()) {
2466 }
◆ optional_ptr() [5/5]
template<
class T , bool SAFE = true>
2467 : ptr(ptr_p.get()) {
2468 }
◆ CheckValid()
template<
class T , bool SAFE = true>
2470 {
2471 if (MemorySafety<SAFE>::ENABLED) {
2472 if (!ptr) {
2473 throw InternalException("Attempting to dereference an optional pointer that is not set");
2474 }
2475 }
2476 }
◆ operator bool()
template<
class T , bool SAFE = true>
2478 {
2479 return ptr;
2480 }
◆ operator*() [1/2]
template<
class T , bool SAFE = true>
2481 {
2482 CheckValid();
2483 return *ptr;
2484 }
◆ operator*() [2/2]
template<
class T , bool SAFE = true>
2485 {
2486 CheckValid();
2487 return *ptr;
2488 }
◆ operator->() [1/2]
template<
class T , bool SAFE = true>
2489 {
2490 CheckValid();
2491 return ptr;
2492 }
◆ operator->() [2/2]
template<
class T , bool SAFE = true>
2493 {
2494 CheckValid();
2495 return ptr;
2496 }
◆ get() [1/2]
template<
class T , bool SAFE = true>
2497 {
2498
2499 return ptr;
2500 }
◆ get() [2/2]
template<
class T , bool SAFE = true>
2501 {
2502
2503 return ptr;
2504 }
◆ get_mutable()
template<
class T , bool SAFE = true>
2506 {
2507
2508 return ptr;
2509 }
◆ operator==()
template<
class T , bool SAFE = true>
2511 {
2512 return ptr == rhs.ptr;
2513 }
◆ operator!=()
template<
class T , bool SAFE = true>
2515 {
2516 return ptr != rhs.ptr;
2517 }
The documentation for this class was generated from the following file: