changeset 12:1ebc743c3d85

add sequence
author Lewin Bormann <lbo@spheniscida.de>
date Thu, 26 Mar 2020 10:06:28 +0100
parents 6461c5c09e5c
children a5357921e566
files CMakeLists.txt src/sequence.cc src/units.cc
diffstat 3 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Mar 25 19:56:46 2020 +0100
+++ b/CMakeLists.txt	Thu Mar 26 10:06:28 2020 +0100
@@ -8,4 +8,5 @@
 add_executable(example src/example.cc)
 add_executable(fac src/fac.cc)
 add_executable(replace_type src/replace_type.cc)
+add_executable(sequence src/sequence.cc)
 add_executable(units src/units.cc)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/sequence.cc	Thu Mar 26 10:06:28 2020 +0100
@@ -0,0 +1,17 @@
+#include <iostream>
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/list_c.hpp>
+#include <boost/static_assert.hpp>
+
+namespace mpl = boost::mpl;
+
+typedef mpl::vector_c<int, 1, 2, 3> seq1;
+typedef mpl::list_c<int, 1, 2, 3> seq2;
+
+BOOST_STATIC_ASSERT(mpl::equal<seq1, seq2>::value);
+
+int main(void) {
+
+    return 0;
+}
--- a/src/units.cc	Wed Mar 25 19:56:46 2020 +0100
+++ b/src/units.cc	Thu Mar 26 10:06:28 2020 +0100
@@ -187,7 +187,8 @@
 static const quantity<int, divide_units<multiply_units<KILOGRAM, METER>::type, multiply_units<SECOND, SECOND>::type>::type> newton(1);
 
 int main(void) {
-    auto force = 1 * kilogram * meter / (second*second);
+    auto force = 1 * kilogram * meter / second * 1/ second + newton;
+
     std::cout << std::string(4 * newton + force) << std::endl;
     return 0;
 }