473,379 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

cv-qualified rvalues

This footnote appears in the section of the Standard specifying lvalue to
rvalue conversion.

(footnote 49)"In C++ class rvalues can have cv-qualified types (because they
are objects). This differs from ISO C, in which non-lvalues never have
cv-qualified types."

I believe I understand the basics of what it's saying. I could have some
class-type object on the right side of an assignment operator. I'm not
completely sure what the significance of it being cv-qualified is. Is this
related to the kind of thing that happens with std::auto_ptr<when it
changes state if its owned object is assigned away?
--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath. www.bartleby.com/61/
Dec 14 '06 #1
1 1839
Steven T. Hatton wrote:
This footnote appears in the section of the Standard specifying
lvalue to rvalue conversion.

(footnote 49)"In C++ class rvalues can have cv-qualified types
(because they are objects). This differs from ISO C, in which
non-lvalues never have cv-qualified types."

I believe I understand the basics of what it's saying. I could have
some class-type object on the right side of an assignment operator.
I'm not completely sure what the significance of it being
cv-qualified is. Is this related to the kind of thing that happens
with std::auto_ptr<when it changes state if its owned object is
assigned away?
#include <iostream>
struct A {
void foo() const { std::cout << "A::foo() const\n"; }
void foo() { std::cout << "A::foo()\n"; }
};

A bar() { return A(); }
A const cbar() { return A(); }

int main() {
bar().foo(); // calls foo
cbar().foo(); // calls foo const
}

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Dec 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: CJM | last post by:
Does anyone have any experience of using barcode reading software with ASP applications? I have an ASP-based application where Serial No's are entered manually. The users want to move across to...
1
by: Dave | last post by:
Hello all, Please see the question in comment form in the program below. Thanks! Dave #include <iostream>
5
by: Brahm | last post by:
Anyone, How can i use xsd.exe to create a class file to include in my c# project? Is this the right program to use? Doing it by hand is a pain. thanks, BRAHM *** Sent via Developersdex...
7
by: drawoh | last post by:
Hi All, I have a class that creates a thread, a mutex and a condition variable in its constructor. I am writing a copy constructor for this class in C++. I am doing a simple copy using the...
1
by: Steven T. Hatton | last post by:
I simply don't get this one: § 4.9/2 "An rvalue of type ?pointer to cv T,? where T is an object type, can be converted to an rvalue of type ?pointer to cv void.? The result of converting a ?pointer...
1
by: js.dhana | last post by:
Hi This is Dhanasree from GAIA Consulting and Solution Pvt. Ltd., a recruiting and staffing Consultant from Chennai. We have been retained by HCL to hire the services of a person with the below...
9
by: Muddasir | last post by:
Hello everyone. could anyone plz help me. I am working on a job portal. Now i am facing problem in CV builder. I am confuse how to implement this through php, where this(CV) will be saved and...
0
by: starkman | last post by:
Hello all, I have been having some problems with using Open CV to play an avi file. I am currently creating a eye input based system, where the mouse is replaced by an eye tracker. I am...
2
by: RHNShK | last post by:
SQL> ED Wrote file afiedt.buf 1 select ROUND(avgprice, 10) avgprice, SeQ_no 2 from (select b.*, 3 sum(decode(INVXH_code, 'BUY', invxh_TOTAL_QTY, -invxh_TOTAL_QTY))...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.