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 7955827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:48:31+00:00 2026-06-04T03:48:31+00:00

I want to design an API, which internally uses EIGEN. Based on http://eigen.tuxfamily.org/dox/TopicPassingByValue.html ,

  • 0

I want to design an API, which internally uses EIGEN.

Based on http://eigen.tuxfamily.org/dox/TopicPassingByValue.html, if a class have a Eigen object as member, it can not be passed by value.

Is there any straight forward way to tell compiler (e.g. g++) the my object can not be passed by value?

  • 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-06-04T03:48:32+00:00Added an answer on June 4, 2026 at 3:48 am

    You can simply make the copy constructor unavailable. You can achieve this by using Boost and inheriting from boost::noncopyable, or by making the copy constructor private:

    struct Foo
    {
    private:
        Foo(Foo const &) { }
    };
    

    Or in the new C++ by explicitly deleting it:

    struct Foo
    {
        Foo(Foo const &) = delete;
        Foo(Foo &&)      = delete;
    };
    

    You should probably also make your class unassignable by doing the same to the assignment operator (and boost::noncopyable takes care of this for you).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to design a c# program which can run program a 3rd exe
I want to design a html business card with a map icon (the icon
We're designing a HTTP service with an external API, which will need to store
I'm writing a wrapper for a REST API (which is a static class with
I have a backend system which i access via a REST based API and
I want design my startup screen with progress bar. But I don't how to
We want to design a simple domain specific language for writing test scripts to
I want to design a chat view like BlackBerry messenger (unfortunately new users are
I want to design a login and register layout using android tabs. Image is
I want to design a music player with ListBox has 2 rows to show

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.