From 93f3a6670ff0ed125986a2e0885eba0c9141bc10 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 21 Apr 2017 23:31:57 +0530 Subject: tests/common/146: Use C++98 features instead of Boost This makes it work on MSVC 2010 and platforms where Boost is not available. --- test cases/common/146 C and CPP link/foo.cpp | 11 +++++++++-- test cases/common/146 C and CPP link/meson.build | 8 ++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/test cases/common/146 C and CPP link/foo.cpp b/test cases/common/146 C and CPP link/foo.cpp index 639af8e..d8b4dbb 100644 --- a/test cases/common/146 C and CPP link/foo.cpp +++ b/test cases/common/146 C and CPP link/foo.cpp @@ -13,10 +13,17 @@ * limitations under the License. */ #include -#include + +const int cnums[] = {0, 61}; + +template +std::vector makeVector(const T (&data)[N]) +{ + return std::vector(data, data+N); +} namespace { - std::vector numbers = boost::assign::list_of(61); + std::vector numbers = makeVector(cnums); } extern "C" int six_one(void) { diff --git a/test cases/common/146 C and CPP link/meson.build b/test cases/common/146 C and CPP link/meson.build index bfee4b2..6f68bac 100644 --- a/test cases/common/146 C and CPP link/meson.build +++ b/test cases/common/146 C and CPP link/meson.build @@ -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( -- cgit v1.1