Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
instead of adding another set of options to 'old' cpp generator I've started creating new one in:
https://github.com/hcorg/thrift/tree/cpp_v2
using old as an reference
main goals (for generator):
- code compatible with old librart (at least for first tests, new lib and compiler switches can be added later)
- no more ugly __isset structure -> boost::optional for optional values
- as a result - no more __ in names, which violates C++ standard
- all generation code will have own unit tests (TDD used wherever possible)
- generated types headers independent from Thrift header, to allow other layers of application using generated types without dependency leaks
- each type will generate own header/cpp file - easier for user to include only used parts.
- unordered map/sets
- returning using move semantics, no more ugly 'return via output parameter' (still possible as option thou - sometimes it's needed for performance)
- async client using boost::future
- enum classes
- initializer lists for constants (maybe)
main goals (for library):
- minimizing boost deps
- using C++11 features to simplify lib
- be base for new generator
I'm aiming in C++11 subset available in gcc 4.8 and MSVC 2013
currently I have only complete enum generation, but work is in progress
all comments etc are very welcome
Attachments
Issue Links
- is related to
-
THRIFT-2242 Generate C++11 code (THRIFT-4720 made us C++11, rename this)
- Open
-
THRIFT-1833 Thrift generates incorrect C++ writer for union
- Closed
-
THRIFT-2154 Missing <operator body
- Closed
-
THRIFT-2075 C++ async client project
- Open
-
THRIFT-2836 Optionally generate C++11 MoveConstructible types
- Closed
-
THRIFT-2061 Use boost::optional instead of bitfields
- Open
-
THRIFT-2062 cpp flag for using unordered_set instead of set
- Closed
-
THRIFT-2692 Allow unit testing of compiler parts
- Closed
- relates to
-
THRIFT-2422 Merge fbthrift
- Closed