Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-5758

CPP: Add pointer semantics for primitive types

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.3
    • platforms
    • None

    Description

      Currently, we can write any user object using two types of semantics:

      // Basic
      writer.WriteObject<ObjectType>(obj);
      // Pointer-based
      writer.WriteObject<ObjectType*>(&obj);
      

      However, this does not work for primitive types:

      // Basic. Works just fine
      writer.WriteObject<std::string>(str);
      // Pointer-based. Compilation error.
      writer.WriteObject<std::string*>(&str);
      

      Need to add support of the pointer semantics for the primitive types as well.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            isapego Igor Sapego Assign to me
            isapego Igor Sapego
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment