Hi,
using g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3 on Ubuntu-10.4, 64bit, I just
started experimenting with variadic templates. They work as expected but
I get lots of warnings of the following kind:
DbTypes.h:198: warning: variadic templates only available with -std=c++0x or -std=gnu++0x
Is there a way to disable that warning without using the -std option? I
tried -std=c++0, but I am experiencing weird linker problems with
boost::filesystem then, see below.
Thanks and regards,
Roland
PS: Here is the text I initially sent to the boost mailing list
regarding the link problem:
--------------------------------------------------------------------------------------------------------
Hi,
getting my feet wet with variadic templates, I switched on c++0x support
in gcc. Unfortunately, I am experiencing a linker error for the
following minimal program:
------------------
#define BOOST_FILESYSTEM_VERSION 3
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>
int main()
{
boost::filesystem::copy_file("a", "b");
}
------------------
rbock@rbock:~/temp/test$ g++ File.cpp -std=c++0x -I boost/1.44/include
-L boost/1.44/lib -l boost_filesystem -l boost_system
/tmp/ccwkcQpq.o: In function
`boost::filesystem3::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&)':
File.cpp:(.text._ZN5boost11filesystem39copy_fileERKNS0_4pathES3_[boost::filesystem3::copy_file(boost::filesystem3::path
const&, boost::filesystem3::path const&)]+0x2a): undefined reference to
`boost::filesystem3::detail::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&, boost::filesystem3::copy_option,
boost::system::error_code*)'
collect2: ld returned 1 exit status
Experienced on Ubuntu-10.4, 64bit, gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Other boost libraries seem to work fine, other functions within
Boost.Filesystem work fine, too.
When I rebuild boost with -std=c++0x, then the linking problem is gone,
but I experience crashes in the boost::thread constructor :-(
Any ideas?
Thanks and regards,
Roland