qxLib
smart_ptr_ref_adapter.inl
Go to the documentation of this file.
1 /**
2 
3  @file smart_ptr_ref_adapter.inl
4  @author Khrapov
5  @date 25.05.2025
6  @copyright © Nick Khrapov, 2025. All right reserved.
7 
8 **/
9 
10 namespace qx::details
11 {
12 
13 template<template<class, class...> class pointer_t, class T, class... args_t>
14 template<class... constructor_args_t>
15 base_smart_ptr_ref_adapter<pointer_t, T, args_t...>::base_smart_ptr_ref_adapter(constructor_args_t&&... args)
16  : original_pointer_type(std::forward<constructor_args_t>(args)...)
17 {
18  // QX_ASSERT(original_pointer_type::get());
19 }
20 
21 template<template<class, class...> class pointer_t, class T, class... args_t>
22 typename base_smart_ptr_ref_adapter<pointer_t, T, args_t...>::reference overload_functions_smart_ptr_ref_adapter<
23  pointer_t,
24  T,
25  args_t...>::get() const noexcept
26 {
27  return *super::original_pointer_type::get();
28 }
29 
30 template<template<class, class...> class pointer_t, class T, class... args_t>
31 template<class... constructor_args_t>
32 overload_functions_smart_ptr_ref_adapter<pointer_t, T, args_t...>::overload_functions_smart_ptr_ref_adapter(
33  constructor_args_t&&... args)
34  : super(std::forward<constructor_args_t>(args)...)
35 {
36 }
37 
38 } // namespace qx::details