• Software
    • CMake Graphviz Output Cleaner
    • FlickrExifTagger
    • copyiptcandxmp
  • Vita
  • Contact
Semipol

Tag Archives: Boost

Boost bind and smart pointers

January 9, 2011 5:13 pm / Leave a Comment / languitar

I’ve seen this several times causing troubles:

C++
1
2
boost::shared_ptr<Foo> p(new Foo);
boost::thread t(boost::bind(&Foo::method, p.get()))

This prevents the livecycle management of shared_ptr or any other smart pointer to be effective in the thread. Hence, p may get destructed even though the thread is still active. Boost bind can handle smart pointers, so instead use the smart pointer itself as the instance argument … Read More →

Posted in: programming / Tagged: boost, C/C++, work-planet

Using googlemock with the Boost Test Library

April 13, 2010 8:03 pm / Leave a Comment / languitar

googlemock is a framework that allows generating mock objects for unit tests. I’ve decided to use this framework as it looks wells designed and maintained. The default is to use googlemock with Google’s unit testing framework googletest, but as I was already using the Boost Testing Library, I was searching for a solution to use … Read More →

Posted in: programming / Tagged: boost, boost.test, C/C++, google, googlemock, Unit Testing, work-planet

Highlights aus der Boost Graph Library

July 30, 2009 3:59 pm / Leave a Comment / languitar

Template Programming to the Extreme… Manchmal macht es echt eine Freude den Quellcode der BGL (Boost Graph Library) zu lesen. Hier ein paar Highlights:

1
typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&amp;);

1
2
3
4
// The graph is passed by *const* reference so that graph adaptors
// (temporaries) can be passed into this function. However, the
// graph is not really const since we may write to property maps
// of the graph.

Spaßig sind aber auch die Compiler-Fehlermeldungen: make all Scanning dependencies of target imnbase [ 7%] Building CXX object src/CMakeFiles/imnbase.dir/algorithms/DefaultAlgorithmFactory.cpp.o [ 14%] Building CXX object src/CMakeFiles/imnbase.dir/algorithms/parallelScan/ParallelScan.cpp.o /usr/local/include/boost/mpi/datatype.hpp: In function »ompi_datatype_t* … Read More →

Posted in: programming / Tagged: BGL, boost, C/C++

Related Sites

  • Photography portfolio
  • Profile at CoR-Lab

Tags

amd64 API assembler bash BGL book boost boost.test browser bug c++ C/C++ c64 CD CDT CMake Computer Vision continuous integration Design Patterns Documentation Doxygen Eclipse enigmail Fahrrad firefox flickr Fotos freedesktop geocaching google image processing Java jenkins linux Mensa OpenCV Panorama Python Schild Speiseplan spelling error thunderbird ubuntu Unit Testing work-planet

Categories

  • internet
  • music
  • photography
  • programming
  • system administration
  • Uncategorized
  • university

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© Copyright 2013 - Semipol
Infinity Theme by DesignCoral / WordPress