1

Topic: Syntax With ++: BOOST_FOREACH vs shared_ptr

Prompt how correctly to write down, please, syntax with ++ for the given constructions: typedef std:: shared_ptr <const CMyClass> CMyClassRef; class CMyClass {public: const std:: vector <int> vValues;...} How correctly to write syntax on search of values? CMyClassRef myClassRef;.... BOOST_FOREACH (int value, myClassRef.vValues) {//it is worked with value value} at such record writes an error what is not true? How correctly to write down?

2

Re: Syntax With ++: BOOST_FOREACH vs shared_ptr

Hello, emergenter, you wrote: E> Prompt how correctly to write down, please, syntax with ++ for the given constructions: BOOST_FOREACH (int value, myClassRef.vValues) for (int value: myClassRef-> vValues)

3

Re: Syntax With ++: BOOST_FOREACH vs shared_ptr

Hello, bnk, you wrote: E>> Prompt how correctly to write down, please, syntax with ++ for the given constructions: bnk> bnk> BOOST_FOREACH (int value, myClassRef.vValues) bnk> for (int value: myClassRef-> vValues) bnk> And still type to remove for (auto value: myClassRef-> vValues)

4

Re: Syntax With ++: BOOST_FOREACH vs shared_ptr

Hello, Igore, you wrote: I> And still type to remove I> I> for (auto value: myClassRef-> vValues) I> And can BOOST_FOREACH with an ulterior motive? To correct access to a member, and it is fine, and auto and new for can not work.