From 297bc80eab5128e1cde7cd597368109a033b6cc0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Sep 2016 18:03:28 +0200 Subject: Update idea: C++ modules support Add module test for Clang and VC --- build2/cxx-modules/modtest/foo.cxx | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 build2/cxx-modules/modtest/foo.cxx (limited to 'build2/cxx-modules/modtest/foo.cxx') diff --git a/build2/cxx-modules/modtest/foo.cxx b/build2/cxx-modules/modtest/foo.cxx new file mode 100644 index 0000000..9a6dbd1 --- /dev/null +++ b/build2/cxx-modules/modtest/foo.cxx @@ -0,0 +1,41 @@ +// file : foo.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +//#include + +#include + +//using namespace std; + +int +foo_value (int v) +{ + return v * 10; +} + +foo:: +foo (int v) + : v_ (v) +{ +} + +int foo:: +value () +{ + return v_ * 100; +} + +int foo:: +macro () +{ + return MODTEST_MACRO; +} + +/* +string foo:: +message (const char* s) const +{ + return string ("foo: ") + s; +} +*/ -- cgit v1.1