aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-21 23:31:57 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-21 23:31:57 +0530
commit93f3a6670ff0ed125986a2e0885eba0c9141bc10 (patch)
tree9290ab5cfe2597e132f712b010108917bb1aaf5d
parent22c4cd6e251f237f31b0612097e33dec391683fb (diff)
downloadmeson-93f3a6670ff0ed125986a2e0885eba0c9141bc10.zip
meson-93f3a6670ff0ed125986a2e0885eba0c9141bc10.tar.gz
meson-93f3a6670ff0ed125986a2e0885eba0c9141bc10.tar.bz2
tests/common/146: Use C++98 features instead of Boost
This makes it work on MSVC 2010 and platforms where Boost is not available.
-rw-r--r--test cases/common/146 C and CPP link/foo.cpp11
-rw-r--r--test cases/common/146 C and CPP link/meson.build8
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 <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) {
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(