[ 
https://issues.apache.org/jira/browse/THRIFT-3130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14531426#comment-14531426
 ] 

Konrad Grochowski commented on THRIFT-3130:
-------------------------------------------

if you remove THRIFT_OVERLOAD_IF thensuch code might not compile:

{code}
XXXXServer(make_shared<SomeProcessor>(), .....);
{code}

shared_ptr has template copy constructor (needed as shared_ptr<SomeProcessor> 
is different type than shared_ptr<TProcessor>), but that template does not 
require any dependency between type in constructor and in shared_ptr
So compiler will not know, which overload to use - one with 
shared_ptr<TProcessor> or shared_ptr<TProcessorFactory>. They're both good 
enough. Or it will report that SomeProcessor* cannot be converted to 
TProcessorFactory*.

I'd reintroduce those macros to TSimpleServer (as imho it's a degradation of 
API)... I don't like them, once I've tried to remove them, but I've lerned hard 
way they're necessary.


as fi\or new header - in Makefile.am there are ..._HEADERS directives - if it 
goes there it will be installed.

> Remove the last vestiges of THRIFT_OVERLOAD_IF from THRIFT-1316
> ---------------------------------------------------------------
>
>                 Key: THRIFT-3130
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3130
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.9.2
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Minor
>
> In THRIFT-1316 some macros were added that have proven to be unnecessary.  
> They were partially eliminated in THRIFT-3083, and this traces the removal of 
> what was left.  In addition, TOutput was moved to its own class, and since 
> TThrift.cpp only contained TOutput code, it was renamed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to