Add and parse cpp_auto_type
This commit is contained in:
parent
203cccd687
commit
acb2f06bfd
5 changed files with 46 additions and 3 deletions
|
|
@ -18,6 +18,8 @@ namespace cppast
|
|||
builtin,
|
||||
user_defined,
|
||||
|
||||
auto_,
|
||||
|
||||
cv_qualified,
|
||||
pointer,
|
||||
reference,
|
||||
|
|
@ -176,6 +178,25 @@ namespace cppast
|
|||
cpp_type_ref entity_;
|
||||
};
|
||||
|
||||
/// A [cppast::cpp_type]() that isn't given but deduced by `auto`.
|
||||
class cpp_auto_type final : public cpp_type
|
||||
{
|
||||
public:
|
||||
/// \returns A newly created `auto` type.
|
||||
static std::unique_ptr<cpp_auto_type> build()
|
||||
{
|
||||
return std::unique_ptr<cpp_auto_type>(new cpp_auto_type);
|
||||
}
|
||||
|
||||
private:
|
||||
cpp_auto_type() = default;
|
||||
|
||||
cpp_type_kind do_get_kind() const noexcept override
|
||||
{
|
||||
return cpp_type_kind::auto_;
|
||||
}
|
||||
};
|
||||
|
||||
class cpp_template_parameter_type;
|
||||
class cpp_template_instantiation_type;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue