Loading...
Searching...
No Matches
ptr_wrapper.h
Go to the documentation of this file.
1#ifndef _BBM_PTR_WRAPPER_CONCEPT_H_
2#define _BBM_PTR_WRAPPER_CONCEPT_H_
3
4/************************************************************************/
5/*! \file ptr_wrapper.h
6 \brief A shared_ptr wrapper.
7*************************************************************************/
8
9namespace bbm {
10 namespace concepts {
11
12 /********************************************************************/
13 /*! \brief ptr_wrapper concept
14
15 \tparam T = pointer wrapper class
16 \tparam BASE = type of underlying wrapper object.
17
18 A ptr wrapper has the following:
19 + the arrow operator
20 + const std::shared_ptr<BASE>& ptr(void) const
21 *********************************************************************/
22 template<typename T, typename BASE>
23 concept ptr_wrapper = requires(const T& t)
24 {
25 { t.ptr() } -> std::convertible_to< std::shared_ptr<BASE> >;
27 };
28
29 } // end concepts namespace
30} // end bbm namespace
31
32#endif /* _BBM_PTR_WRAPPER_CONCEPT_H_ */
Definition: util.h:156
ptr_wrapper concept
Definition: ptr_wrapper.h:23
Definition: aggregatebsdf.h:29