
10 Jun
2009
10 Jun
'09
3:33 a.m.
2009/6/9 Emil Dotchevski <emildotchevski@gmail.com>:
You're making the same point I was thinking about earlier, which is that in theory #pragma once shouldn't be faster than include guards. So how about this:
#include <boost/detail/workaround.hpp> #if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1500) #pragma once #endif
Other than the fact that this should just be solved for once and for all in MSVC, rather than forcing us to pollute our code, I don't see a problem with just using this: #ifdef BOOST_ENABLE_PRAGMA_ONCE #pragma once #endif That way anyone who wants it can have it, and it's obvious by looking at the headers how to get it, but we're not encouraging its use.