Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:49:22+00:00 2026-05-24T10:49:22+00:00

reply_form::reply_form() { using cppcms::locale::translate; author.message(translate(Author)); comment.message(translate(Comment)); send.value(translate(Send)); *this + author + comment + send;

  • 0
reply_form::reply_form()
{
    using cppcms::locale::translate;
    author.message(translate("Author"));
    comment.message(translate("Comment"));
    send.value(translate("Send"));
    *this + author + comment + send;
    author.limits(1,64);
    comment.limits(1,256);
}

In the given constructor definition, someone please explain what this syntax means or its intended use and benefits:

*this + author + comment + send;

To me, it appears as if a concatenation/addition which is done without it being assigned to anything, and thats really confusing me as I am not able to understand its purpose.

I have made good searches on web with the problem, but probably, I am not using the right term to search for it as I do not know what exactly this type of syntax is termed as.

I feel as if its the part of latest C++1x features, but not sure, so not able to find the right book for it. Finally chose stackoverflow for rescue 🙂

EDIT:

the Most relevant I could provide is its declaration in header file, which is:

struct reply_form : public cppcms::form {
    cppcms::widgets::text author;
    cppcms::widgets::textarea comment;
    cppcms::widgets::submit send;
    reply_form();
};

EDIT2:Revision2 (corrected again after checking comments)

Ok, I was able to traceback the operator+ thing, and found out the way it was overloaded:

    inline form &operator + (form &f)
    {
        add(f);
        return *this;
    }

So this was the case of operator overloading. Thanks for your answer. I have been recently migrated to C++ and had found some strange things as I had posted in this thread:
Explain blank class functions in C++ which appeared to me as multifunction list with blank body, but later I understood it as a syntax and a way of declaring a variable or calling the base class constructor.

Thanks for your answers, it were really helpful and very quick!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:49:22+00:00Added an answer on May 24, 2026 at 10:49 am

    Most likely is a fluent operator overwritten to add fields to a reply_form. Eg.

    reply_form& reply_form::operator+ (const field& value)
    {
        this->add_field (value);
        return *this;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a YouTube Reply/Comment type wall on my website. This allows users to
I'd like to submit some text into this form using JSoup. How would I
I'm using the PHP mail() function to send email from a contact form. The
I'm using PHP's mail() function on a form to send an e-mail to an
I want to send email using the php code, Following is the code should
I'm having trouble updating the DOM when doing an AJAX post using JQuery. This
I ran into a wee issue when using mail(). I wasn't able to send
I am using the following code to send email in codeigniter and would like
I'm trying to create a simple message form using navigateToURL() and PHP mail(). But
I'm using PHP's Mail function to send emails to individuals. I wanted an easy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.