Haruyuki Mohri

毛利春幸のブログです。

C++Builder XE8 (Win64) tried C++11 "for(obj : std::vector<std::shared_ptr<TFmxObject> > ){}

"For" in the C++11 can be of such a description below.

for (const int &i : array)

std::cout << i << ' ';

http://en.cppreference.com/w/cpp/language/range-for

"C++Builder XE8" I tried Is it possible any time.

std::vector<std::shared_ptr<TFmxObject> > list;

We have created the 100 "TFmxObject" to the list.

for (std::shared_ptr<TFmxObject> obj_: list)
{
Memo1->Lines->Append(IntToStr(obj_->Tag) + "=" + obj_->Name);
}

It can be convenient writing is.

 

f:id:mojeld:20150705223144p:plain

Writing of this "for" It is impossible at this time in the "C++Builder(Win32)".