Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Kylix/Compiler/C++/Front-end/Language/Templates    [ Add a report in this area ]  
Report #:  92135   Status: Closed
(Pulled) This code gets a compiler error when it should compile fine:
#include <string>

template <typename T>
void Foo(const
Project:  Kylix Build #:  0.0.0.1
Version:    1.0 Submitted By:   QC<->Raid Replicator Account
Report Type:  Crash / Data loss / Total failure Date Reported:  5/5/2000 12:00:00 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    RedHat Linux Internal Tracking #:   84252
Resolution: Fixed (Resolution Comments) Resolved in Build: : 5.6
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
This code gets a compiler error when it should compile fine:
#include <string>

template <typename T>
void Foo(const std::string &Value)
{
}

int main()
{
  Foo<int>("123"); // Error
}
Steps to Reproduce:
bcc32 84252.cpp
//res:
Error E2285 84252.cpp 10: Could not find a match for 'Foo<T>(char *)' in function main()

//exp: no error
Workarounds
None
Attachment
N
Comments

None

Server Response from: ETNACODE01