[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Please add support for non-copiable but movable types to C++ parser
From: |
Askar Safin |
Subject: |
Please add support for non-copiable but movable types to C++ parser |
Date: |
Sun, 01 Mar 2015 12:36:04 +0300 |
Please, add support for non-copiable, but movable (I mean C++11 moving
construstors and moving operator=) semantic values to C++ parser (to %define
api.value.type variant, of course).
For example, it is very useful to have the following semantic type for
expressions like 2 + 3 - 4:
class expr
{
public:
enum class kind {num, plus, minus};
kind k;
int num;
std::unique_ptr<expr> a;
std::unique_ptr<expr> b;
};
But, unfortunately, unique_ptr member makes this types non-copiable, so
currently this class cannot be used as semantic value.
(CC me if you want to answer)
==
Askar Safin
http://vk.com/safinaskar
Kazan, Russia
- Please add support for non-copiable but movable types to C++ parser,
Askar Safin <=