header-only

Creation of a Header-Only Library

Hello :) I'd like to package a library I'm working on as a Header-Only library to make it easier for clients to use the library (it's small and there's really no reason to make it a separate translation item). However, I cannot simply put my code in headers because such a location would violate C++'s one definition rule if a project use...

Is this too much code for a header only library?

It seems like I had to inline quite a bit of code here. I'm wondering if it's bad design practice to leave this entirely in a header file like this: #include <list> #include <string> #include <boost/noncopyable.hpp> #include <boost/make_shared.hpp> #include <boost/iterator/iterator_facade.hpp> #include <Windows.h> #include "../Exception...

Is it ever impossible to write a header-only library?

Is there ever such a pattern of dependancies that it is impossible to keep everything in header files only? What if we enforced a rule of one class per header only? For the purposes of this question, let's ignore static things :) ...