[ https://issues.apache.org/jira/browse/THRIFT-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14194908#comment-14194908 ]
Konrad Grochowski commented on THRIFT-2717: ------------------------------------------- I decided to go with v1/v2. I needed to do some changes in lib and I didn't want to push them into existing one. Also - I want to generate code that uses boost only for optionals. So I created cpp_v2 library - that's the simplest and possible cleanest solution. If we assume that this library can advance with thrift versions, this will be clean (no ifdefs etc) place for moving to c++14, c++17 etc, still keeping cpp_v1 for those who can't update theirs compilers. I wasn't planning to write complete new lib, I created it mostly just to escape from boost::shared_ptr :) So I just copied cpp_v1 and removed almost all occurrences of boost. I also removed all Mutexes, Guards etc from concurrency in favor of {{<thread>}} (that makes whole thrift lib a lot smaller and easier to maintain). When I finish generator, I'll copy all tests from cpp_v1. I assume new lib will require more work (like possible merge with stuff from fbthrift), so I'll probably make a pull req for this branch soon after 0.9.2 release, to allow more people to contribute (assuming lib will be stable, but not complete). > C++V2 generator/library > ----------------------- > > Key: THRIFT-2717 > URL: https://issues.apache.org/jira/browse/THRIFT-2717 > Project: Thrift > Issue Type: New Feature > Components: C++ - Compiler > Reporter: Konrad Grochowski > > instead of adding another set of options to 'old' cpp generator I've started > creating new one in: > https://github.com/hcorg/thrift/tree/cpp11_generator > using old as an reference > main goals: > * 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) > 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 :) -- This message was sent by Atlassian JIRA (v6.3.4#6332)