Subject: [Boost-bugs] [Boost C++ Libraries] #11822: nvcc can not compile BOOST_AUTO_TEST_CASE_TEMPLATE
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-26 08:57:51
#11822: nvcc can not compile BOOST_AUTO_TEST_CASE_TEMPLATE
--------------------------------+---------------------
Reporter: e.zenker@⦠| Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost 1.59.0 | Severity: Problem
Keywords: nvcc test template |
--------------------------------+---------------------
Compiling a test suite for testing CUDA code with nvcc with
CUDA 7.5 and gcc 4.9. and leads to the following error:
{{{
/usr/lib/gcc/x86_64-unknown-linux-
gnu/4.9.3/include/c++/bits/basic_string.h(444): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage" is undefined in device code
/usr/include/boost/test/tree/test_case_template.hpp(84): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_terminal" is undefined in device code
/usr/include/boost/test/tree/test_case_template.hpp(86): error: identifier
"_ZTIi" is undefined
/usr/lib/gcc/x86_64-unknown-linux-
gnu/4.9.3/include/c++/bits/basic_string.h(444): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage" is undefined in device code
/usr/include/boost/test/tree/test_case_template.hpp(84): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_terminal" is undefined in device code
/usr/include/boost/test/tree/test_case_template.hpp(86): error: identifier
"_ZTIl" is undefined
/usr/lib/gcc/x86_64-unknown-linux-
gnu/4.9.3/include/c++/bits/basic_string.h(444): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage" is undefined in device code
/usr/include/boost/test/tree/test_case_template.hpp(84): error: identifier
"std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_terminal" is undefined in device code
}}}
The test suite is more or less equal to the simple
test in the boost.test documentation for templated tests.
Here a snippet:
{{{
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE "Tests"
#include <boost/test/unit_test.hpp>
#include <boost/mpl/list.hpp>
typedef boost::mpl::list<int,long,unsigned char> test_types;
BOOST_AUTO_TEST_SUITE( template_test )
BOOST_AUTO_TEST_CASE_TEMPLATE( my_test, T, test_types )
{
BOOST_CHECK_EQUAL( sizeof(T), (unsigned)4 );
}
BOOST_AUTO_TEST_SUITE_END()
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11822> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC