Skip to content

Jaime Rios

  • About
  • Github
  • LinkedIn
  • X

Boost

Setting a boost shared_ptr to NULL

April 25, 2011 by jaimerios

If you need to set a boost shared_ptr to NULL, then you can do it like this: boost::shared_ptr(); So, if you have a function that returns a boost shared_ptr and you want to pass NULL to represent either an error state or a not-found state, you can do this: #include typedef boost::shared_ptr OohClassPtr; typedef std::map< ... Read more

Categories Coding Tags Boost, C++, cpp, shared_ptr Leave a comment

Getting rid of the Boost warnings

October 29, 2010 by jaimerios

Ever since I started to do 64-bit development, I had a problem with the Boost headers producing a ton of implicit conversion warnings in Xcode. This is due to the fact that I am compiling with the following flag: -Wshorten-64-to-3 I got this idea from both Herb Sutter and the Viva 64 website, where you … Read more

Categories Coding Tags 64-bit warnings, Boost, gcc, implicit conversion Leave a comment

Recent Posts

  • Package management with CMake’s CPM
  • Automate Evernote using AppleScript
  • Unit Tests and CMake
  • clang static analyzer
  • C++ std::erase and rbegin/rend

Recent Comments

  1. Connecting with C++ – Jaime Rios on Working with REST
  2. Connecting with C++ – Jaime Rios on Making a connection using Swift
  3. Jaime on Xcode 3.1, Perforce and Scripts
  4. jaimerios.com » Blog Archive » Haversine formula now on GitHub on Calculating distance between 2 points on Earth using the Haversine formula
  5. iPhone 3G: How to show locations around a fixed point? | Questions on Calculating distance between 2 points on Earth using the Haversine formula
© 2025 Jaime Rios • Built with GeneratePress