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

Missing space "<::" in C++ generator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.16.0
    • 0.17.0
    • C++ - Compiler
    • None
    • Microsoft Visual Studio Professional 2022
      Version 17.1.0
      VisualStudio.17.Release/17.1.0+32210.238

    Description

      Autogenerated code in C++ is missing space between "<" and "::" 

      e.G.:

       

          if (style == "Concurrent") {
              f_header_ << ", std::shared_ptr<::apache::thrift::async::TConcurrentClientSyncInfo> sync";
          }

       

      Code cannot be compiled due to needed leading space, in case the name is used inside of a template parameter.  "MyTemplate<::foo::Bar>" is not valid C++, since "<:" is an alternative token for "[". as mentioned here

      t_cpp_generator.cc

      Attachments

        Issue Links

          Activity

            People

              rengglian Andreas Renggli
              rengglian Andreas Renggli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 5m Original Estimate - 5m
                  5m
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m