Add cpp_function_template
This commit is contained in:
parent
edb132981a
commit
93c6e0f44c
6 changed files with 71 additions and 0 deletions
|
|
@ -69,6 +69,8 @@ const char* cppast::to_string(cpp_entity_kind kind) noexcept
|
|||
|
||||
case cpp_entity_kind::alias_template_t:
|
||||
return "alias template";
|
||||
case cpp_entity_kind::function_template_t:
|
||||
return "function template";
|
||||
|
||||
case cpp_entity_kind::count:
|
||||
break;
|
||||
|
|
@ -108,6 +110,7 @@ bool cppast::is_type(cpp_entity_kind kind) noexcept
|
|||
case cpp_entity_kind::non_type_template_parameter_t:
|
||||
case cpp_entity_kind::template_template_parameter_t:
|
||||
case cpp_entity_kind::alias_template_t:
|
||||
case cpp_entity_kind::function_template_t:
|
||||
case cpp_entity_kind::count:
|
||||
break;
|
||||
}
|
||||
|
|
@ -120,6 +123,7 @@ bool cppast::is_template(cpp_entity_kind kind) noexcept
|
|||
switch (kind)
|
||||
{
|
||||
case cpp_entity_kind::alias_template_t:
|
||||
case cpp_entity_kind::function_template_t:
|
||||
return true;
|
||||
|
||||
case cpp_entity_kind::file_t:
|
||||
|
|
|
|||
14
src/cpp_function_template.cpp
Normal file
14
src/cpp_function_template.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
// This file is subject to the license terms in the LICENSE file
|
||||
// found in the top-level directory of this distribution.
|
||||
|
||||
#include <cppast/cpp_function_template.hpp>
|
||||
|
||||
#include <cppast/cpp_entity_kind.hpp>
|
||||
|
||||
using namespace cppast;
|
||||
|
||||
cpp_entity_kind cpp_function_template::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::function_template_t;
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
#include <cppast/cpp_enum.hpp>
|
||||
#include <cppast/cpp_file.hpp>
|
||||
#include <cppast/cpp_function.hpp>
|
||||
#include <cppast/cpp_function_template.hpp>
|
||||
#include <cppast/cpp_language_linkage.hpp>
|
||||
#include <cppast/cpp_member_function.hpp>
|
||||
#include <cppast/cpp_namespace.hpp>
|
||||
|
|
@ -63,6 +64,8 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
return handle_container<cpp_template_template_parameter>(e, cb, functor);
|
||||
case cpp_entity_kind::alias_template_t:
|
||||
return handle_container<cpp_alias_template>(e, cb, functor);
|
||||
case cpp_entity_kind::function_template_t:
|
||||
return handle_container<cpp_function_template>(e, cb, functor);
|
||||
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
case cpp_entity_kind::using_directive_t:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue