tests/common/146: Use C++98 features instead of Boost

This makes it work on MSVC 2010 and platforms where Boost is not
available.
pull/1654/head
Nirbheek Chauhan 8 years ago
parent 22c4cd6e25
commit 93f3a6670f
  1. 11
      test cases/common/146 C and CPP link/foo.cpp
  2. 8
      test cases/common/146 C and CPP link/meson.build

@ -13,10 +13,17 @@
* limitations under the License.
*/
#include <vector>
#include <boost/assign/list_of.hpp>
const int cnums[] = {0, 61};
template<typename T, int N>
std::vector<T> makeVector(const T (&data)[N])
{
return std::vector<T>(data, data+N);
}
namespace {
std::vector<int> numbers = boost::assign::list_of(61);
std::vector<int> numbers = makeVector(cnums);
}
extern "C" int six_one(void) {

@ -12,13 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
project('C and C++ static link test', ['c', 'cpp'],
default_options : ['cpp_std=c++03'])
project('C and C++ static link test', ['c', 'cpp'])
dep_boost = dependency('boost')
libcppfoo = static_library('cppfoo', ['foo.cpp', 'foo.hpp'],
dependencies : dep_boost)
libcppfoo = static_library('cppfoo', ['foo.cpp', 'foo.hpp'])
libcfoo = static_library('cfoo', ['foo.c', 'foo.h'])
libfoo = shared_library(

Loading…
Cancel
Save