diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-09-28 18:03:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-09-28 18:03:28 +0200 |
commit | 297bc80eab5128e1cde7cd597368109a033b6cc0 (patch) | |
tree | 251806183b14a8b643b2bfe1c934c73022c90628 /build2/cxx-modules/modtest/bar.cxx | |
parent | a00f98381c708fbba986844762368be3d0e20a6f (diff) |
Update idea: C++ modules support
Add module test for Clang and VC
Diffstat (limited to 'build2/cxx-modules/modtest/bar.cxx')
-rw-r--r-- | build2/cxx-modules/modtest/bar.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/build2/cxx-modules/modtest/bar.cxx b/build2/cxx-modules/modtest/bar.cxx new file mode 100644 index 0000000..457f29e --- /dev/null +++ b/build2/cxx-modules/modtest/bar.cxx @@ -0,0 +1,35 @@ +// file : bar.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +//#include <string> + +#include <bar> + +//using namespace std; + +int +bar_value (int v) +{ + return v * 100; +} + +bar:: +bar (int v) + : v_ (v) +{ +} + +int bar:: +value () +{ + return v_ * 1000; +} + +/* +string bar:: +message (const char* s) const +{ + return string ("bar: ") + s; +} +*/ |