[odb-users] Clang vs gcc

Boris Kolpackov boris at codesynthesis.com
Thu Nov 10 04:05:43 EST 2016


Hi Tiago,

Tiago Macarios <tiagomacarios at gmail.com> writes:

> Just wondering. Have you had a look at using clang instead of gcc
> for ODB's backend?

The thought crossed my mind though that will require quite a bit of
work and I am not entirely sure it is possible. For example, ODB
uses GCC's template machinery to instantiation templates after the
compilation. It does it, for example, to determine whether a type
is a container, a pointer, etc; you implement a normal C++ traits
and ODB uses it to figure things out. Last time I checked this was
not (easily) possible with Clang. Once compiled, its AST is immutable.
But maybe I am wrong/things changed.

Boris



More information about the odb-users mailing list