I cannot see how I am getting this error message:
TreeAddress aResult( memory::Pointer(aBaseAddress) );
if (TreeFragment * pFragment = TreeAccessor::access(aResult,_anUpdater))
/data2/office/configmgr/source/tree/builddata.cxx: In member function
`configmgr ::data::TreeAddress configmgr::data::TreeNodeBuilder::
allocTreeFragment(configmg r::memory::UpdateAccessor&)':
/data2/office/configmgr/source/tree/builddata.cxx:658: error: no matching
function for
call to `configmgr::data::TreeAccessor::access(configmgr:: data::TreeAddress (&)
(configmgr::memory::Pointer), configmgr::memory::UpdateAccessor&)'
.../inc/treeaccessor.hxx:139: error: candidates are
: static configmgr::sharable:: TreeFragment*
configmgr::data::TreeAccessor::
access(const configmgr::data::TreeA ddress&,
configmgr::memory::UpdateAccessor&)
.../inc/treeaccessor.hxx:141: error: static const configmgr::shar
able::TreeFragment*
configmgr::data::TreeAccessor::access(const configmgr::data:
:TreeAddress&,
const configmgr::memory::Accessor&) 6 1984
ken wrote in news:pa***************************@gandalf.foskey. org: I cannot see how I am getting this error message:
TreeAddress aResult( memory::Pointer(aBaseAddress) );
The above is a function declaration ie:
TreeAddress aResult( memory::Pointer aBaseAddress );
change it to:
TreeAddress aResult = memory::Pointer(aBaseAddress);
or maybe:
TreeAddress aResult( ( memory::Pointer(aBaseAddress) ) ); if (TreeFragment * pFragment = TreeAccessor::access(aResult,_anUpdater))
/data2/office/configmgr/source/tree/builddata.cxx: In member function `configmgr ::data::TreeAddress configmgr::data::TreeNodeBuilder:: allocTreeFragment(configmg r::memory::UpdateAccessor&)': /data2/office/configmgr/source/tree/builddata.cxx:658: error: no matching function for call to
This is the bit you needed to read carefully:
`configmgr::data::TreeAccessor::access(configmgr:: data::TreeAddress (&) (configmgr::memory::Pointer), configmgr::memory::UpdateAccessor&)'
Note the type of the first argument.
../inc/treeaccessor.hxx:139: error: candidates are : static configmgr::sharable:: TreeFragment* configmgr::data::TreeAccessor:: access(const configmgr::data::TreeA ddress&, configmgr::memory::UpdateAccessor&) ../inc/treeaccessor.hxx:141: error: static const configmgr::shar able::TreeFragment* configmgr::data::TreeAccessor::access(const configmgr::data: :TreeAddress&, const configmgr::memory::Accessor&)
HTH
Rob.
-- http://www.victim-prime.dsl.pipex.com/
"Rob Williscroft" <rt*@freenet.REMOVE.co.uk> wrote in message
news:Xn**********************************@195.129. 110.200... ken wrote in news:pa***************************@gandalf.foskey. org:
I cannot see how I am getting this error message:
TreeAddress aResult( memory::Pointer(aBaseAddress) );
The above is a function declaration ie:
TreeAddress aResult( memory::Pointer aBaseAddress );
change it to:
TreeAddress aResult = memory::Pointer(aBaseAddress);
or maybe:
TreeAddress aResult( ( memory::Pointer(aBaseAddress) ) );
No, it will not help. You might with to consider the proper static_cast
instead.
--
With regards,
Michael Kochetkov.
On Sun, 20 Jul 2003 19:09:01 +0400, Michael Kochetkov wrote: "Rob Williscroft" <rt*@freenet.REMOVE.co.uk> wrote in message news:Xn**********************************@195.129. 110.200... ken wrote in news:pa***************************@gandalf.foskey. org:
> I cannot see how I am getting this error message: > > TreeAddress aResult( memory::Pointer(aBaseAddress) );
The above is a function declaration ie:
TreeAddress aResult( memory::Pointer aBaseAddress );
change it to:
TreeAddress aResult = memory::Pointer(aBaseAddress);
or maybe:
TreeAddress aResult( ( memory::Pointer(aBaseAddress) ) ); No, it will not help. You might with to consider the proper static_cast instead.
Static cast was the original code. It compiled fine until 3.3.1
TreeAddress aResult( static_cast<memory::Pointer>(aBaseAddress) );
Isn't memory::Pointer(aBaseAddress) instantiating a temporary of type
memory::Pointer, not declaring a variable ABaseAddress. The brackets
are calling the constructor.
I now understand how to work around this, I just don't understand what I did
wrong.
--
Ta
KenF
"ken" <ke*@gandalf.foskey.org> wrote in message
news:pa****************************@gandalf.foskey .org... On Sun, 20 Jul 2003 19:09:01 +0400, Michael Kochetkov wrote:
"Rob Williscroft" <rt*@freenet.REMOVE.co.uk> wrote in message news:Xn**********************************@195.129. 110.200... ken wrote in news:pa***************************@gandalf.foskey. org:
> I cannot see how I am getting this error message: > > TreeAddress aResult( memory::Pointer(aBaseAddress) );
The above is a function declaration ie:
TreeAddress aResult( memory::Pointer aBaseAddress );
change it to:
TreeAddress aResult = memory::Pointer(aBaseAddress);
or maybe:
TreeAddress aResult( ( memory::Pointer(aBaseAddress) ) ); No, it will not help. You might with to consider the proper static_cast instead.
Static cast was the original code. It compiled fine until 3.3.1
TreeAddress aResult( static_cast<memory::Pointer>(aBaseAddress) );
Isn't memory::Pointer(aBaseAddress) instantiating a temporary of type memory::Pointer, not declaring a variable ABaseAddress. The brackets are calling the constructor.
I now understand how to work around this, I just don't understand what I
did wrong.
No, memory::Pointer(aBaseAddress) is a parameter type, followed by a
parameter name. The brackets are ignored. I.e.
TreeAddress aResult( memory::Pointer(aBaseAddress) );
is exactly the same as
TreeAddress aResult( memory::Pointer aBaseAddress );
which is a function prototype.
There is a rule in C++, if something could be an expression or a
declaration, its treated as a declaration. See the recent thread 'Temporary
creation vs. variable declaration' for other examples.
john
"Rob Williscroft" <rt*@freenet.REMOVE.co.uk> wrote in message
news:Xn**********************************@195.129. 110.131... Michael Kochetkov wrote in news:3f********@news.trustworks.com:
"Rob Williscroft" <rt*@freenet.REMOVE.co.uk> wrote in message news:Xn**********************************@195.129. 110.200... ken wrote in news:pa***************************@gandalf.foskey. org:
> I cannot see how I am getting this error message: > > TreeAddress aResult( memory::Pointer(aBaseAddress) );
The above is a function declaration ie:
TreeAddress aResult( memory::Pointer aBaseAddress );
change it to:
TreeAddress aResult = memory::Pointer(aBaseAddress);
or maybe:
TreeAddress aResult( ( memory::Pointer(aBaseAddress) ) ); No, it will not help. You might with to consider the proper static_cast instead.
Maybe, but if so, you and the OP have non-comforming compilers.
Right you are. I have overlooked the opening parenthesis place (I have
considered TreeAddress (aResult( memory::Pointer(aBaseAddress) ) ); ).
Sorry.
--
With regards,
Michael Kochetkov.
On Mon, 21 Jul 2003 07:08:31 +0100, John Harrison wrote: There is a rule in C++, if something could be an expression or a declaration, its treated as a declaration. See the recent thread 'Temporary creation vs. variable declaration' for other examples.
The penny drops, thanks for your help.
--
KenF This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike |
last post by:
Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334,...
|
by: wukexin |
last post by:
Help me, good men. I find mang books that introduce bit "mang header
files",they talk too bit,in fact it is my too fool, I don't learn it, I have
do a test program, but I have no correct doing...
|
by: baustin75 |
last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie
only when debugging in php designer 2005
--------------------------------------------------------------------------------
...
|
by: Amanda |
last post by:
From a guy in Microsoft newsgroups:
| In *comp.databases.ibm-db2* there are always IBM guys
| from the Toronto labs on line.Post with the
| -for the love of god please help-
| line...
|
by: tyler_durden |
last post by:
thanks a lot for all your help..I'm really appreciated...
with all the help I've been getting in forums I've been able to continue
my program and it's almost done, but I'm having a big problem that...
|
by: Marc Violette |
last post by:
<Reply-To: veejunk@sympatico.ca>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET
developper, and am trying to follow a series of exercises in the book
entitled...
|
by: James Radke |
last post by:
Hello,
I have a multithreaded windows NT service application (vb.net 2003) that I
am working on (my first one), which reads a message queue and creates
multiple threads to perform the processing...
|
by: Rahul |
last post by:
Hi Everybody
I have some problem in my script. please help me. This is script file.
I have one *.inq file. I want run this script in XML files. But this
script errors shows . If u want i am...
|
by: tracy |
last post by:
Hi, I really need help.
I run this script and error message appeal as below:
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG'...
|
by: =?Utf-8?B?ZGdvdw==?= |
last post by:
I designed a "contact_us" page in visual web developer 2005 express along
with EW2 after viewing tutorials on asp.net's help page. Features work like
they should, but I cannot figure out how to...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |