Rick Posted June 21, 2010 Share Posted June 21, 2010 wow, nevermind. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2010 Share Posted June 21, 2010 It's a Boost command. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 It seems VS already has this. I wasn't aware as I never used it and never looked into it before. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2010 Share Posted June 21, 2010 Yeah, Boost is nowadays industrial standard too, so you will find it in many compilers by default, just like STL. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 Are you sure it's the actual boost library in VS 2010? If I google VS 2010 and boost it seems people are still trying to build boost for it. Why would one have to do that if it was already in there? Quote Link to comment Share on other sites More sharing options...
TylerH Posted June 28, 2010 Share Posted June 28, 2010 Boost has about 50 or so libraries that do different things. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted June 28, 2010 Author Share Posted June 28, 2010 Yeah, I was just questioning if VS actually used boost or not. Quote Link to comment Share on other sites More sharing options...
Roland Posted June 30, 2010 Share Posted June 30, 2010 for_each is a normal STL function. No BOOST needed Works in VS2008 and VS2010 Example: #include <iostream> #include <algorithm> #include <vector> using namespace std; class myTest { public: void operator() (const std::string& s ) { cout << " " << s.c_str() << endl ; } } ; int main() { myTest test; vector<string> myStrings ; myStrings.push_back("For" ); myStrings.push_back("Each" ); myStrings.push_back("Works" ); for_each( myStrings.begin(), myStrings.end(), test ); return 0; } Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Rick Posted June 30, 2010 Author Share Posted June 30, 2010 Yeah, but VS 2005 and above has what I would consider a "normal" foreach. One that doesn't require a function. One that is inline. I didn't know that before. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.