Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1573

Error on TNonblockingServer constructor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8
    • None
    • C++ - Library
    • Patch Available

    Description

      If the TNonblockingServer is to construct:
      TNonblockingServer server(processorFactory, protocolFactory, port, threadManager);

      the compiler generates an error:
      error C2664: apache::thrift::server::TServer::TServer(const apache::thrift::server::TServer &): cannot convert parameter 1 from "const boost::shared_ptr<T>" to "const apache::thrift::server::TServer &" e:\develop\cpp\lib\thrift\src\server\tnonblockingserver.h 264

      patch:

      Index: TServer.h
      ===================================================================
      --- TServer.h	(revision 1337971)
      +++ TServer.h	(working copy)
      @@ -142,7 +142,7 @@
       
       protected:
         template<typename ProcessorFactory>
      -  TServer(const boost::shared_ptr<TProcessorFactory>& processorFactory,
      +  TServer(const boost::shared_ptr<ProcessorFactory>& processorFactory,
                 THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory)):
           processorFactory_(processorFactory) {
           setInputTransportFactory(boost::shared_ptr<TTransportFactory>(
      @@ -166,7 +166,7 @@
         }
       
         template<typename ProcessorFactory>
      -  TServer(const boost::shared_ptr<TProcessorFactory>& processorFactory,
      +  TServer(const boost::shared_ptr<ProcessorFactory>& processorFactory,
                 const boost::shared_ptr<TServerTransport>& serverTransport,
                 THRIFT_OVERLOAD_IF(ProcessorFactory, TProcessorFactory)):
           processorFactory_(processorFactory),
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bobik Denis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: