tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

boost, BOOST_HAS_VARIADIC_TMPL and std=c++0x



Hi,

I'm trying to compile software using boost-headers on a recent netbsd-i386
(gcc-4.5.3, boost-1.47).

I encounter the following error, because I don't use -std=c++0x:
error: variadic templates only available with -std=c++0x or -std=gnu++0

It appears that /usr/pkg/include/boost/user.hpp has the following:
#ifndef BOOST_NO_CONFIG
#  define BOOST_NO_CONFIG
#endif
#define BOOST_HAS_VARIADIC_TMPL

Setting BOOST_NO_CONFIG disable automatic detection of the compiler features,
and since boost was compiled by pkgsrc with -std=c++0x, the *VARIADIC_TMPL
feature is hardcoded to yes.

My problem: this forces the use of -std=c++0x for all software willing to use
boost.

While if BOOST_NO_CONFIG if not defined, boost does some automatic feature
detection and one can use either "g++" or "g++ -std=c++0x", depending on the
actual requirements.

So my questions are:
 - did I miss something? (I want to compile my software without -std=c++0x).
 - Is the boost setup really meant to be like that (couldn't it avoid defining
   BOOST_NO_CONFIG)?

Cheers,
Anthony


Home | Main Index | Thread Index | Old Index