Transforms osrm_exception to exception

This commit is contained in:
Daniel J. Hofmann
2016-01-28 14:27:05 +01:00
parent 5de8f1803c
commit 64b36807d3
20 changed files with 22 additions and 22 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "util/exception.hpp"
// This function exists to 'anchor' the class, and stop the compiler from
// copying vtable and RTTI info into every object file that includes
// this header. (Caught by -Wweak-vtables under Clang.)
// More information from the LLVM Coding Standards:
// If a class is defined in a header file and has a vtable (either it has
// virtual methods or it derives from classes with virtual methods), it must
// always have at least one out-of-line virtual method in the class. Without
// this, the compiler will copy the vtable and RTTI into every .o file that
// #includes the header, bloating .o file sizes and increasing link times.
namespace osrm
{
namespace util
{
void exception::anchor() const {}
}
}