Commit Graph

96 Commits

Author SHA1 Message Date
King_DuckZ 369e5d555c Fix include 2022-06-06 13:11:03 +02:00
King_DuckZ 08a2b58510 Warning fix on latest gcc 2022-06-06 12:03:11 +02:00
King_DuckZ fcaa62d69f Fix copy-construction warning in clang
This bumps the c++ requirement to c++17
2021-04-08 15:01:42 +02:00
King_DuckZ 2c1bf17c6b Explicit assignment in copy constructors 2021-04-08 12:07:24 +02:00
King_DuckZ 9d63269bfa Remove gtest copy
I don't know why this was included not as a
submodule or a regular dependency, but it looks
wrong to me. Re-added as submodule.
2021-04-06 12:15:24 +02:00
King_DuckZ c5c982a9a4 Add optional set_*() methods.
Useful if you need a setter/getter pair,
for example to register them into some
other library.
2021-04-04 14:42:37 +02:00
King_DuckZ 3842f6c7b8 Version bump to 1.1.2 2021-03-18 16:08:52 +01:00
King_DuckZ 7d5d4c2e05 Fix assignment when wrapped type is a c-style array 2021-03-18 16:07:49 +01:00
King_DuckZ c1bf2f2c3c Found the change there, looks good to me, committing 2021-03-12 00:12:30 +01:00
King_DuckZ cdb2650241 Just some test for wrappers of c-style arrays 2021-03-12 00:11:28 +01:00
King_DuckZ 31546e83c6 Add a sample program to verify compiler optimisations. 2020-06-10 18:15:51 +02:00
King_DuckZ af7fe9f1fa Improve install 2020-05-05 11:02:58 +02:00
King_DuckZ 965caeee7b Version bump to 1.1.1 2020-05-05 03:23:09 +02:00
King_DuckZ 222a3b3621 Update copyright to 2020 2020-05-04 03:59:02 +02:00
King_DuckZ 4f47a24478 Add min/max functions 2020-05-04 03:54:15 +02:00
King_DuckZ eaeac13e14 Allow some implicit conversions, I don't think it will hurt perf or anything. 2020-04-08 00:01:09 +02:00
King_DuckZ 2e30692071 Fix cmake files so client projects can link to the interface target.
This way they can link to vwr::vectorwrapper to have the
correct include path added.
2020-04-07 23:53:19 +02:00
King_DuckZ 0a90a289a2 Add support for meson build system. 2020-03-28 21:02:28 +01:00
King_DuckZ fcd09b2f85 Fix option name - it's spelled BUILD_TESTING. 2019-01-20 01:13:46 +00:00
King_DuckZ 92775e075f See https://cliutils.gitlab.io/modern-cmake/chapters/install/installing.html 2019-01-19 13:30:17 +00:00
King_DuckZ 0ffa18c0cf Generate a cmakefile for importing this library from other projects. 2019-01-19 11:39:44 +00:00
King_DuckZ 19b12600d8 Add the version number to vectorwrapper.hpp 2019-01-19 11:06:49 +00:00
King_DuckZ a4184811b1 Add test for a custom type.
Custom type is implicitly constructible, implicitly castable
to float and can be compared to int.
2018-10-30 20:31:49 +00:00
King_DuckZ 7225298698 Trying to fix markdown in readme 2018-07-28 14:28:31 +01:00
King_DuckZ 8f179919f5 Update readme 2018-07-28 00:18:06 +01:00
King_DuckZ 1e713696d7 Add unit test for offset-based getters. 2018-07-28 00:04:24 +01:00
King_DuckZ a81c4c1077 Add support for 4D vectors. 2018-07-27 23:41:23 +01:00
King_DuckZ 08378698b8 Move VecBase stuff to its own .inl file. 2018-07-27 23:22:21 +01:00
King_DuckZ e0e167b658 Split VecBase into a separate file.
vec_common is required as some definitions are needed by
both vectorwrapper and vec_base. I also wanted to keep
all of the define_has_* macro invocations together, for
clarity.
2018-07-27 23:08:36 +01:00
King_DuckZ 50ebba1c31 Merge branch 'vector_iterator' 2017-08-02 23:38:45 +01:00
King_DuckZ d9dacb739a Properly stop looping when vec values go past the end. 2017-08-02 23:37:25 +01:00
King_DuckZ 421e5e2433 Allow extra casting if users explicitly whitelist them.
They'll have to make VectorTypeInfo<V> inherit from
is_castable_to<U> for every U they want the V to be
castable to. Note that if they also want U to be castable
to V (so the other way around) they'll have to explicitly
whitelist that conversion too in VectorTypeInfo<U>.
2017-07-27 23:42:21 +01:00
King_DuckZ 445d7b5e27 Forward to the other ctor. 2017-07-27 20:54:49 +01:00
King_DuckZ e242f0b154 Allow an iteration step. 2017-07-27 20:48:52 +01:00
King_DuckZ 9dfa2b0545 Add a convenience operator<< overload for easy printing to std::cout. 2017-07-26 23:54:04 +01:00
King_DuckZ 2ff4301471 Use the last index, not just the last value in Vec. 2017-07-26 23:53:13 +01:00
King_DuckZ 42f3133640 Check that all indices are valid.
The code tries to make the compiler spit out which one is the
invalid index, if any.
2017-07-26 23:31:11 +01:00
King_DuckZ c1b6bd0500 Add unit test for backwards iteration. 2017-07-26 22:48:39 +01:00
King_DuckZ 221f236f40 Finish implementing the sequence_range feature. 2017-07-26 21:16:19 +01:00
King_DuckZ 0e739c9582 Broken implementation of vector_iterator. WiP 2017-07-26 13:52:30 +01:00
King_DuckZ b7616a4fcf Make sure to only match Vec<std::array> types. 2017-07-23 14:18:03 +01:00
King_DuckZ f4715ec87f Add a sample gdb pretty printer for Vec<std::array> types 2017-07-23 14:02:44 +01:00
King_DuckZ 546bd7e270 Remove pointless symlink. 2017-03-16 21:33:46 +00:00
King_DuckZ 34e5775972 Don't put the path when including headers. 2017-03-16 20:58:49 +00:00
King_DuckZ 6ce534fc8a Update license header 2017-03-15 22:13:13 +00:00
King_DuckZ 83418105e3 static_cast assignments by default.
This can be disabled by defining VWR_WITH_UNCASTED_ASSIGNMENT.
2017-03-11 08:45:11 +00:00
King_DuckZ 33bc1e73da Use pragma once instead of inclusion guards.
Multiple versions of the same library can't be used in the same
project because even tho project take care to include from
the right vectorwrapper-1.0/ dir the inclusion guard is the
same. So in spite of having a different path and livingi in a
different namespace, ifndef is preventing the inclusions to work.
2017-03-04 01:19:15 +00:00
King_DuckZ 9533c73cd6 Add versioned symlink to include directory 2017-03-04 01:00:39 +00:00
King_DuckZ db7b9becd5 Let users specify a wrapping namespace.
This is useful when vwr is used and publicly exposed in a
library. If both the library and the standalone project depend
on vwr, this change gives the user the opportunity to keep the
two usages separate. This is especially important if both the
library and the standalone program happen to specialize the
Info template for the same type.
2017-03-04 00:04:40 +00:00
King_DuckZ aaa8e75dc1 Implement 2D and 3D cross product.
2D cross product is defined as equivalent to:
res = cross(a.xy0(), b.xy0()).z()
2017-02-01 01:51:52 +00:00