Add cpp_namespace
This commit is contained in:
parent
170c4045e2
commit
c25103e680
9 changed files with 113 additions and 9 deletions
|
|
@ -14,6 +14,11 @@ namespace cppast
|
|||
struct assert_handler : debug_assert::set_level<1>, debug_assert::default_handler
|
||||
{
|
||||
};
|
||||
|
||||
struct precondition_error_handler : debug_assert::set_level<1>,
|
||||
debug_assert::default_handler
|
||||
{
|
||||
};
|
||||
}
|
||||
} // namespace cppast::detail
|
||||
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ namespace cppast
|
|||
struct intrusive_list_access
|
||||
{
|
||||
template <typename U>
|
||||
static T* get_next(const intrusive_list_node<U>& obj)
|
||||
static T* get_next(const U& obj)
|
||||
{
|
||||
static_assert(std::is_base_of<U, T>::value, "must be a base");
|
||||
return static_cast<T*>(obj.next_.get());
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
static T* set_next(intrusive_list_node<U>& obj, std::unique_ptr<T> node)
|
||||
static T* set_next(U& obj, std::unique_ptr<T> node)
|
||||
{
|
||||
static_assert(std::is_base_of<U, T>::value, "must be a base");
|
||||
obj.next_ = std::move(node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue