C/C++ Modules Example

Hi,

I’m really interested in how modules work, and I’ve read the document here:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3347.pdf

And the talk by Doug Gregor.

I understand that a lot of this is already functional in Clang, but I can’t get it to work. I’ve looked at the examples in test/Modules but I think they require objective-c or something.

Perhaps someone can give me pointers on getting it to work in either C or C++?

I have a small test setup here, any feedback would be welcome:

https://github.com/d-snp/clang-module-example

Kind regards,
Tinco

Check out the recent thread “[cfe-dev] How do I try out C++ modules with clang?”

http://thread.gmane.org/gmane.comp.compilers.clang.devel/39209/

In particular this post which contains a “minimal example” in the attachment: http://article.gmane.org/gmane.comp.compilers.clang.devel/39224

Ohh my apologies that’s silly of me, for some reason I had only google-searched the llvm mailing list, not the clang one.

Thanks, I’ll dig through it! :slight_smile: