Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package Vc for openSUSE:Factory checked in 
at 2022-01-04 21:03:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Vc (Old)
 and      /work/SRC/openSUSE:Factory/.Vc.new.1896 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Vc"

Tue Jan  4 21:03:10 2022 rev:16 rq:943836 version:1.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/Vc/Vc.changes    2021-12-27 16:07:14.925694132 
+0100
+++ /work/SRC/openSUSE:Factory/.Vc.new.1896/Vc.changes  2022-01-04 
21:03:11.597832297 +0100
@@ -1,0 +2,14 @@
+Tue Jan  4 18:40:30 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 1.4.2:
+  * Added a missing include for GCC11.
+  * Fixed a corner case in the unit tests
+  * Fixed a warning in the unit tests.
+  * Removed the deprecated Vector<T, VectorAbi::Scalar>::reinterpretCast
+    to fix a warning with GCC10
+  * Avoid potentially pessimizing std::move in return statements.
+  * Avoid redefinition of bit_scan{forward,reverse} macros.
+  * Improved performance of simized random access containers
+- drop 0001-Add-missing-include-to-simdarray.h-275.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  0001-Add-missing-include-to-simdarray.h-275.patch
  Vc-1.4.1.tar.gz

New:
----
  Vc-1.4.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Vc.spec ++++++
--- /var/tmp/diff_new_pack.l2dvlO/_old  2022-01-04 21:03:12.073832649 +0100
+++ /var/tmp/diff_new_pack.l2dvlO/_new  2022-01-04 21:03:12.077832652 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package Vc
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 # Copyright (c) 2018 Asterios Dramis <asterios.dra...@gmail.com>.
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,15 +18,13 @@
 
 
 Name:           Vc
-Version:        1.4.1
+Version:        1.4.2
 Release:        0
 Summary:        Collection of SIMD Vector Classes
 License:        BSD-3-Clause
 Group:          System/Libraries
 URL:            https://github.com/VcDevel/Vc/
 Source0:        
https://github.com/VcDevel/Vc/releases/download/%{version}/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM
-Patch0:         0001-Add-missing-include-to-simdarray.h-275.patch
 BuildRequires:  cmake
 BuildRequires:  doxygen
 BuildRequires:  gcc-c++

++++++ Vc-1.4.1.tar.gz -> Vc-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/.travis.yml new/Vc-1.4.2/.travis.yml
--- old/Vc-1.4.1/.travis.yml    2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/.travis.yml    2021-06-22 15:38:39.000000000 +0200
@@ -1,131 +1,37 @@
 language: cpp
-
-cache: ccache
-
-env:
-    - arch=x86_64  CXX_VERSION=current
-    - arch=x86_64  CXX_VERSION=previous
-    - arch=x86_64  CXX_VERSION=default
-    - arch=aarch64 CXX_VERSION=default
+sudo: required
+dist: bionic
 
 os:
-    - linux
-    - osx
+  - linux
+  - osx
 
 compiler:
-    - gcc
-    - clang
+  - gcc
+  - clang
 
 matrix:
-    exclude:
-        - env: arch=x86_64  CXX_VERSION=previous
-          os: osx
-          compiler: clang
-        - env: arch=aarch64 CXX_VERSION=default
-          os: osx
-        - env: arch=x86_64  CXX_VERSION=default
-          os: osx
-          compiler: gcc
-    allow_failures:
-        - os: osx
-          compiler: gcc
-
-# The following gives us Ubuntu 14.04 LTS instead of 12.04 LTS
-sudo: required
-dist: trusty
-
-install:
-    - case "$TRAVIS_OS_NAME-$CXX-$CXX_VERSION-$arch" in
-        linux-g++-current-x86_64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          sudo apt-get update -q &&
-          sudo apt-get install g++-6 -y &&
-          export CXX=g++-6 CC=gcc-6;;
-        linux-g++-previous-x86_64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          sudo apt-get update -q &&
-          sudo apt-get install g++-5 -y &&
-          export CXX=g++-5 CC=gcc-5;;
-        linux-g++-default-x86_64)
-          ;;
-        linux-clang++-current-x86_64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add 
- &&
-          sudo tee /etc/apt/sources.list.d/llvm.list <<< "deb 
http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" &&
-          sudo apt-get update -q &&
-          sudo apt-get install clang-5.0 -y &&
-          export CXX=clang++-5.0 CC=clang-5.0;;
-        linux-clang++-previous-x86_64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add 
- &&
-          sudo tee /etc/apt/sources.list.d/llvm.list <<< "deb 
http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main" &&
-          sudo apt-get update -q &&
-          sudo apt-get install clang-4.0 -y &&
-          export CXX=clang++-4.0 CC=clang-4.0;;
-        linux-clang++-default-x86_64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          sudo apt-get update -q &&
-          sudo apt-get install clang-3.8 libstdc++-6-dev libc++-dev 
libc++abi-dev -y &&
-          export CXX=clang++-3.8 CC=clang-3.8;;
-        osx-g++-current-x86_64)
-          brew cask uninstall oclint &&
-          brew update &&
-          brew install gcc@8 &&
-          export CXX=g++-8 CC=gcc-8;;
-        osx-g++-previous-x86_64)
-          brew cask uninstall oclint &&
-          brew update &&
-          brew install gcc@7 &&
-          export CXX=g++-7 CC=gcc-7;;
-        osx-clang++-current-x86_64)
-          wget 
http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz &&
-          tar xf clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz &&
-          cd clang+llvm-4.0.0-x86_64-apple-darwin &&
-          export CXX=$PWD/bin/clang++ CC=$PWD/bin/clang &&
-          export LDFLAGS="-L$PWD/lib -Wl,-rpath,$PWD/lib" &&
-          export CPPFLAGS=-I$PWD/include &&
-          cd ..;;
-        osx-clang++-previous-x86_64)
-          exit 1;;
-        osx-clang++-default-x86_64)
-          ;;
-        linux-g++-default-aarch64)
-          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-          sudo add-apt-repository -y 'deb http://de.archive.ubuntu.com/ubuntu/ 
xenial main' &&
-          sudo add-apt-repository -y 'deb http://de.archive.ubuntu.com/ubuntu/ 
xenial-updates main' &&
-          sudo apt-get update -q &&
-          sudo apt-get install -y g++-5-aarch64-linux-gnu &&
-          export CXX=aarch64-linux-gnu-g++-5 CC=aarch64-linux-gnu-gcc-5 
CMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm-linux.cmake;;
-        linux-clang++-default-aarch64)
-          wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add 
- &&
-          sudo tee /etc/apt/sources.list.d/llvm.list <<< "deb 
http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" &&
-          sudo apt-get update -q &&
-          sudo apt-get install -y clang-5.0 &&
-          sudo add-apt-repository -y 'deb http://de.archive.ubuntu.com/ubuntu/ 
xenial main' &&
-          sudo add-apt-repository -y 'deb http://de.archive.ubuntu.com/ubuntu/ 
xenial-updates main' &&
-          sudo apt-get update -q &&
-          sudo apt-get install -y libstdc++-5-dev-arm64-cross 
gcc-5-aarch64-linux-gnu &&
-          export CPATH=/usr/aarch64-linux-gnu/include &&
-          export CXX="clang++-5.0 -target aarch64-linux-gnu" CC="clang-5.0 
-target aarch64-linux-gnu" &&
-          export CMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm-linux.cmake;;
-      esac
+  # Actually the same as clang
+  exclude:
+    - os: osx
+      compiler: gcc
 
 before_script:
-    - $CXX --version
-    - cmake --version
-    - export dashboard_model=Experimental
-    - export build_type=Release
-    - export NUMBER_OF_PROCESSORS=2
+  - $CXX --version
+  - cmake --version
+  - export dashboard_model=Experimental
+  - export build_type=Release
+  - export NUMBER_OF_PROCESSORS=2
 
 script:
-    - ctest -V -S test.cmake
+  - ctest -V -S test.cmake
 
 notifications:
-    email: false
-    irc:
-        channels:
-            - "chat.freenode.net##Vc"
-        on_success: change # [always|never|change] # default: always
-        on_failure: always # [always|never|change] # default: always
-        use_notice: true
-        skip_join: true
+  email: false
+  irc:
+    channels:
+      - "chat.freenode.net##Vc"
+    on_success: change
+    on_failure: always
+    use_notice: true
+    skip_join: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/CMakeLists.txt new/Vc-1.4.2/CMakeLists.txt
--- old/Vc-1.4.1/CMakeLists.txt 2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/CMakeLists.txt 2021-06-22 15:38:39.000000000 +0200
@@ -192,6 +192,7 @@
    Vc/SimdArray
    Vc/Utils
    Vc/Vc
+   Vc/algorithm
    Vc/array
    Vc/iterators
    Vc/limits
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/CTestConfig.cmake 
new/Vc-1.4.2/CTestConfig.cmake
--- old/Vc-1.4.1/CTestConfig.cmake      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/CTestConfig.cmake      2021-06-22 15:38:39.000000000 +0200
@@ -2,7 +2,7 @@
 set(CTEST_NIGHTLY_START_TIME "00:00:00 CEST")
 
 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "lxwww53.gsi.de")
+set(CTEST_DROP_SITE "cdash.cern.ch")
 set(CTEST_DROP_LOCATION "/submit.php?project=Vc")
 
 set(CTEST_DROP_SITE_CDASH TRUE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/README.md new/Vc-1.4.2/README.md
--- old/Vc-1.4.1/README.md      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/README.md      2021-06-22 15:38:39.000000000 +0200
@@ -1,3 +1,7 @@
+**You may be interested in switching to 
[std-simd](https://github.com/VcDevel/std-simd).**
+GCC 11 includes an experimental version of `std::simd` as part of libstdc++, 
which also works with clang.
+Features present in Vc 1.4 and not present in *std-simd* will eventually turn 
into Vc 2.0,which then depends on *std-simd*.
+
 # Vc: portable, zero-overhead C++ types for explicitly data-parallel 
programming
 
 Recent generations of CPUs, and GPUs in particular, require data-parallel codes
@@ -50,6 +54,9 @@
   vectorization which does not scale to different vector sizes. However, the
   example is instructive to compare it with similar solutions of other 
languages
   or libraries.
+* [N-vortex solver](https://godbolt.org/z/4o1cg_) showing `simdize`d iteration
+  over many `std::vector<float>`. Note how [important the `-march` flag is, 
compared
+  to plain `-mavx2 -mfma`](https://godbolt.org/z/hKiOjr).
 
 ### Scalar Product
 
@@ -128,14 +135,15 @@
 the documentation by running `doxygen` in the `doc` subdirectory.
 Alternatively, you can find nightly builds of the documentation at:
 
-* [1.4 branch](https://web-docs.gsi.de/~mkretz/Vc-1.4/)
-* [1.4.1 release](https://web-docs.gsi.de/~mkretz/Vc-1.4.1/)
-* [1.4.0 release](https://web-docs.gsi.de/~mkretz/Vc-1.4.0/)
-* [1.3 branch](https://web-docs.gsi.de/~mkretz/Vc-1.3/)
-* [1.3.0 release](https://web-docs.gsi.de/~mkretz/Vc-1.3.0/)
-* [1.2.0 release](https://web-docs.gsi.de/~mkretz/Vc-1.2.0/)
-* [1.1.0 release](https://web-docs.gsi.de/~mkretz/Vc-1.1.0/)
-* [0.7 branch](https://web-docs.gsi.de/~mkretz/Vc-0.7/)
+* [1.4 branch](https://vcdevel.github.io/Vc-1.4/)
+* [1.4.2 release](https://vcdevel.github.io/Vc-1.4.2/)
+* [1.4.1 release](https://vcdevel.github.io/Vc-1.4.1/)
+* [1.4.0 release](https://vcdevel.github.io/Vc-1.4.0/)
+* [1.3 branch](https://vcdevel.github.io/Vc-1.3/)
+* [1.3.0 release](https://vcdevel.github.io/Vc-1.3.0/)
+* [1.2.0 release](https://vcdevel.github.io/Vc-1.2.0/)
+* [1.1.0 release](https://vcdevel.github.io/Vc-1.1.0/)
+* [0.7 branch](https://vcdevel.github.io/Vc-0.7/)
 
 ## Publications
 
@@ -152,16 +160,6 @@
 [Work on integrating the functionality of Vc in the C++ standard library.](
 https://github.com/VcDevel/Vc/wiki/ISO-Standardization-of-the-Vector-classes)
 
-## Communication
-
-A channel on the freenode IRC network is reserved for discussions on Vc:
-[##vc on freenode](irc://chat.freenode.net:6667/##vc)
-([via SSL](ircs://chat.freenode.net:6697/##vc))
-
-Feel free to use the GitHub issue tracker for questions.
-Alternatively, there's a [mailinglist for users of
-Vc](https://compeng.uni-frankfurt.de/mailman/listinfo/vc)
-
 ## License
 
 Vc is released under the terms of the [3-clause BSD 
license](http://opensource.org/licenses/BSD-3-Clause).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Test_all_compilers.sh 
new/Vc-1.4.2/Test_all_compilers.sh
--- old/Vc-1.4.1/Test_all_compilers.sh  2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Test_all_compilers.sh  2021-06-22 15:38:39.000000000 +0200
@@ -12,7 +12,9 @@
 test -z "dashboard_model" && export dashboard_model=Experimental
 
 runTest() {
-  CFLAGS="$1" CXXFLAGS="$1" ctest -S test.cmake || true
+  libpath="$LD_LIBRARY_PATH"
+  test -n "$1" && libpath="$(dirname $(realpath $($CXX $1 
-print-file-name=libstdc++.so)))${libpath:+:}${libpath}"
+  LD_LIBRARY_PATH="$libpath" CFLAGS="$1" CXXFLAGS="$1" ctest -S test.cmake || 
true
 }
 
 tested_compilers="lsakdfjwowleqirjodfisj"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/Allocator new/Vc-1.4.2/Vc/Allocator
--- old/Vc-1.4.1/Vc/Allocator   2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/Allocator   2021-06-22 15:38:39.000000000 +0200
@@ -237,7 +237,8 @@
 #include "vector.h"
 namespace std
 {
-    template<typename T> class allocator<Vc::Vector<T> > : public 
::Vc::Allocator<Vc::Vector<T> >
+    template<typename T, typename Abi>
+    class allocator<Vc::Vector<T, Abi> > : public 
::Vc::Allocator<Vc::Vector<T, Abi> >
     {
     public:
         template<typename U> struct rebind { typedef ::std::allocator<U> 
other; };
@@ -246,8 +247,8 @@
         const allocator &select_on_container_copy_construction() const { 
return *this; }
 #endif
     };
-    template <typename T>
-    class allocator<Vc::Mask<T>> : public ::Vc::Allocator<Vc::Mask<T>>
+    template <typename T, typename Abi>
+    class allocator<Vc::Mask<T, Abi>> : public ::Vc::Allocator<Vc::Mask<T, 
Abi>>
     {
     public:
         template<typename U> struct rebind { typedef ::std::allocator<U> 
other; };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/common/algorithms.h 
new/Vc-1.4.2/Vc/common/algorithms.h
--- old/Vc-1.4.1/Vc/common/algorithms.h 2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/common/algorithms.h 2021-06-22 15:38:39.000000000 +0200
@@ -83,7 +83,7 @@
         load_interleaved(tmp, std::addressof(*first));
         f(tmp);
     }
-    return std::move(f);
+    return f;
 }
 
 template <typename InputIt, typename UnaryFunction,
@@ -108,7 +108,7 @@
         f(tmp);
         store_interleaved(tmp, std::addressof(*first));
     }
-    return std::move(f);
+    return f;
 }
 #endif
 
@@ -133,7 +133,7 @@
         load_interleaved(tmp, std::addressof(*first));
         f(tmp);
     }
-    return std::move(f);
+    return f;
 }
 
 template <typename InputIt, typename UnaryFunction,
@@ -158,7 +158,7 @@
         f(tmp);
         store_interleaved(tmp, std::addressof(*first));
     }
-    return std::move(f);
+    return f;
 }
 
 }  // namespace Vc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/common/bitscanintrinsics.h 
new/Vc-1.4.2/Vc/common/bitscanintrinsics.h
--- old/Vc-1.4.1/Vc/common/bitscanintrinsics.h  2018-11-19 13:14:38.000000000 
+0100
+++ new/Vc-1.4.2/Vc/common/bitscanintrinsics.h  2021-06-22 15:38:39.000000000 
+0200
@@ -29,11 +29,8 @@
 #define VC_COMMON_BITSCANINTRINSICS_H_
 
 #if defined(Vc_GCC) || defined(Vc_CLANG) || defined(Vc_APPLECLANG)
-#  if Vc_GCC >= 0x40500
-     // GCC 4.5.0 introduced _bit_scan_forward / _bit_scan_reverse
-#    include <x86intrin.h>
-#  else
-     // GCC <= 4.4 and clang have x86intrin.h, but not the required functions
+#include <x86intrin.h>
+#  ifndef _bit_scan_forward
 #    define _bit_scan_forward(x) __builtin_ctz(x)
 #include "macros.h"
 static Vc_ALWAYS_INLINE Vc_CONST int _Vc_bit_scan_reverse_asm(unsigned int x) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/common/simdarray.h 
new/Vc-1.4.2/Vc/common/simdarray.h
--- old/Vc-1.4.1/Vc/common/simdarray.h  2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/common/simdarray.h  2021-06-22 15:38:39.000000000 +0200
@@ -33,6 +33,7 @@
 //#include "../IO"
 
 #include <array>
+#include <limits>
 
 #include "writemaskedvector.h"
 #include "simdarrayhelper.h"
@@ -292,7 +293,7 @@
     template <class U, class Flags = DefaultLoadTag,
               class = enable_if<std::is_arithmetic<U>::value &&
                                 Traits::is_load_store_flag<Flags>::value>>
-    explicit Vc_INTRINSIC SimdArray(const U *mem, Flags f = Flags()) : 
data(mem, f)
+    explicit Vc_INTRINSIC SimdArray(const U *mem, Flags f = {}) : data(mem, f)
     {
     }
 
@@ -770,7 +771,7 @@
     template <typename U, typename Flags = DefaultLoadTag,
               typename = enable_if<std::is_arithmetic<U>::value &&
                                    Traits::is_load_store_flag<Flags>::value>>
-    explicit Vc_INTRINSIC SimdArray(const U *mem, Flags f = Flags())
+    explicit Vc_INTRINSIC SimdArray(const U *mem, Flags f = {})
         : data0(mem, f), data1(mem + storage_type0::size(), f)
     {
     }
@@ -786,7 +787,7 @@
     template <typename U, std::size_t Extent, typename Flags = DefaultLoadTag,
               typename = enable_if<std::is_arithmetic<U>::value &&
                                    Traits::is_load_store_flag<Flags>::value>>
-    explicit Vc_INTRINSIC SimdArray(CArray<U, Extent> &mem, Flags f = Flags())
+    explicit Vc_INTRINSIC SimdArray(CArray<U, Extent> &mem, Flags f = {})
         : data0(&mem[0], f), data1(&mem[storage_type0::size()], f)
     {
     }
@@ -796,7 +797,7 @@
     template <typename U, std::size_t Extent, typename Flags = DefaultLoadTag,
               typename = enable_if<std::is_arithmetic<U>::value &&
                                    Traits::is_load_store_flag<Flags>::value>>
-    explicit Vc_INTRINSIC SimdArray(const CArray<U, Extent> &mem, Flags f = 
Flags())
+    explicit Vc_INTRINSIC SimdArray(const CArray<U, Extent> &mem, Flags f = {})
         : data0(&mem[0], f), data1(&mem[storage_type0::size()], f)
     {
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/common/simdize.h 
new/Vc-1.4.2/Vc/common/simdize.h
--- old/Vc-1.4.1/Vc/common/simdize.h    2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/common/simdize.h    2021-06-22 15:38:39.000000000 +0200
@@ -1351,8 +1351,22 @@
 {
     return fromIteratorImpl<It, V, 0, determine_tuple_size<V>()>(it);
 }
+
 template <typename It, typename V>
-Vc_INTRINSIC V fromIterator(enable_if<Traits::is_simd_vector<V>::value, It> it)
+Vc_INTRINSIC V fromIterator(
+    enable_if<
+        Traits::is_simd_vector<V>::value && 
Traits::has_contiguous_storage<It>::value, It>
+        it)
+{
+    Vc_ASSERT(&*it + 1 == &*(it + 1));
+    return V(&*it, Vc::Unaligned);
+}
+
+template <typename It, typename V>
+Vc_INTRINSIC V fromIterator(enable_if<Traits::is_simd_vector<V>::value &&
+                                          
!Traits::has_contiguous_storage<It>::value,
+                                      It>
+                                it)
 {
     V r;
     for (size_t j = 0; j < V::size(); ++j, ++it) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/common/span.h 
new/Vc-1.4.2/Vc/common/span.h
--- old/Vc-1.4.1/Vc/common/span.h       2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/common/span.h       2021-06-22 15:38:39.000000000 +0200
@@ -518,6 +518,9 @@
     }
 
 #ifdef __cpp_lib_byte
+// Disable _as_bytes() for older MSVC versions as it leads to a compilation 
error due to a compiler bug.
+// When parsing the return type, MSVC will instantiate the primary template of 
span<> and static_assert().
+#if _MSC_VER > 1928
     span<const std::byte, dynamic_extent> _as_bytes() const noexcept
     {
         return {reinterpret_cast<const std::byte*>(data()), size_bytes()};
@@ -527,6 +530,7 @@
     {
         return {reinterpret_cast<std::byte*>(data()), size_bytes()};
     }
+#endif
 #endif  // __cpp_lib_byte
 
 private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/global.h new/Vc-1.4.2/Vc/global.h
--- old/Vc-1.4.1/Vc/global.h    2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/global.h    2021-06-22 15:38:39.000000000 +0200
@@ -132,9 +132,19 @@
 #endif
 
 #ifdef Vc_GCC
-#  define Vc_HAVE_MAX_ALIGN_T 1
+#  if Vc_GCC >= 0x70000 && defined __i386__ && (!defined __GLIBC_PREREQ || 
!__GLIBC_PREREQ(2,26))
+     // GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with 
malloc in 2.26.
+     // 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
+     // 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
+#  elif Vc_GCC >= 0x40900
+#    define Vc_HAVE_STD_MAX_ALIGN_T 1
+#  else
+#    define Vc_HAVE_MAX_ALIGN_T 1
+#  endif
 #elif !defined(Vc_CLANG) && !defined(Vc_ICC)
 //   Clang/ICC don't provide max_align_t at all
+//   TODO: Clang defines max_align_t since 3.5.0. Whether std::max_align_t is 
defined depends on the
+//   standard library version.
 #  define Vc_HAVE_STD_MAX_ALIGN_T 1
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/scalar/math.h 
new/Vc-1.4.2/Vc/scalar/math.h
--- old/Vc-1.4.1/Vc/scalar/math.h       2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/scalar/math.h       2021-06-22 15:38:39.000000000 +0200
@@ -84,13 +84,17 @@
 
 template <typename T,
           typename = enable_if<std::is_same<T, double>::value || 
std::is_same<T, float>::value ||
-                               std::is_same<T, short>::value ||
                                std::is_same<T, int>::value>>
 Vc_ALWAYS_INLINE Vc_PURE Scalar::Vector<T> abs(Scalar::Vector<T> x)
 {
     return std::abs(x.data());
 }
 
+Vc_ALWAYS_INLINE Vc_PURE Scalar::Vector<short> abs(Scalar::Vector<short> x)
+{
+    return std::abs(static_cast<int>(x.data()));
+}
+
 template<typename T> static Vc_ALWAYS_INLINE void sincos(const 
Scalar::Vector<T> &x, Scalar::Vector<T> *sin, Scalar::Vector<T> *cos)
 {
 #if defined(_WIN32) || defined(__APPLE__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/scalar/vector.h 
new/Vc-1.4.2/Vc/scalar/vector.h
--- old/Vc-1.4.1/Vc/scalar/vector.h     2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/scalar/vector.h     2021-06-22 15:38:39.000000000 +0200
@@ -210,13 +210,13 @@
         {
             return V2(static_cast<typename V2::EntryType>(m_data));
         }
-        template <typename V2>
-        Vc_DEPRECATED("use reinterpret_components_cast instead") 
Vc_ALWAYS_INLINE V2
-            reinterpretCast() const
-        {
-            typedef typename V2::EntryType AliasT2 Vc_MAY_ALIAS;
-            return V2(*reinterpret_cast<const AliasT2 *>(&m_data));
-        }
+//        template <typename V2>
+//        Vc_DEPRECATED("use reinterpret_components_cast instead") 
Vc_ALWAYS_INLINE V2
+//            reinterpretCast() const
+//        {
+//            typedef typename V2::EntryType AliasT2 Vc_MAY_ALIAS;
+//            return V2(*reinterpret_cast<const AliasT2 *>(&m_data));
+//        }
 
         Vc_ALWAYS_INLINE Common::WriteMaskedVector<Vector, Mask> 
operator()(Mask m)
         {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/traits/has_contiguous_storage.h 
new/Vc-1.4.2/Vc/traits/has_contiguous_storage.h
--- old/Vc-1.4.1/Vc/traits/has_contiguous_storage.h     2018-11-19 
13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/traits/has_contiguous_storage.h     2021-06-22 
15:38:39.000000000 +0200
@@ -55,16 +55,20 @@
 {
 namespace has_contiguous_storage_detail
 {
+// heuristic: consider RandomAccessIterator as abstracting contiguous storage
+// case 1: T is a container
 template <typename T, typename It = typename T::iterator>
 std::is_base_of<std::random_access_iterator_tag,
-                typename It::iterator_category>
-test(int);  // this is only a heuristic. Having a RandomAccessIterator does 
not guarantee
-            // contiguous storage
+                typename std::iterator_traits<It>::iterator_category>
+test(int);
+
+// case 2: T is an iterator type
 template <typename T>
 std::is_base_of<std::random_access_iterator_tag,
-                typename T::iterator_category>
-test(long);  // this is only a heuristic. Having a RandomAccessIterator does 
not guarantee
-             // contiguous storage
+                typename std::iterator_traits<T>::iterator_category>
+test(long);
+
+// case 3: everything else
 template <typename T> std::false_type test(...);
 }  // namespace has_contiguous_storage_detail
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/Vc/version.h new/Vc-1.4.2/Vc/version.h
--- old/Vc-1.4.1/Vc/version.h   2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/Vc/version.h   2021-06-22 15:38:39.000000000 +0200
@@ -37,13 +37,13 @@
  * \ingroup Utilities
  * Contains the version string of the %Vc headers. Same as Vc::versionString().
  */
-#define Vc_VERSION_STRING "1.4.1"
+#define Vc_VERSION_STRING "1.4.2"
 
 /**
  * \ingroup Utilities
  * Contains the encoded version number of the %Vc headers. Same as 
Vc::versionNumber().
  */
-#define Vc_VERSION_NUMBER 0x010402
+#define Vc_VERSION_NUMBER 0x010404
 
 /**
  * \ingroup Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/cmake/VcMacros.cmake 
new/Vc-1.4.2/cmake/VcMacros.cmake
--- old/Vc-1.4.1/cmake/VcMacros.cmake   2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/cmake/VcMacros.cmake   2021-06-22 15:38:39.000000000 +0200
@@ -32,7 +32,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
 
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 2.8.3...3.13)
 
 get_filename_component(_currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 include ("${_currentDir}/UserWarning.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/doc/Doxyfile new/Vc-1.4.2/doc/Doxyfile
--- old/Vc-1.4.1/doc/Doxyfile   2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/doc/Doxyfile   2021-06-22 15:38:39.000000000 +0200
@@ -38,7 +38,7 @@
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 1.4.1
+PROJECT_NUMBER         = 1.4.2
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/doc/dox.h new/Vc-1.4.2/doc/dox.h
--- old/Vc-1.4.1/doc/dox.h      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/doc/dox.h      2021-06-22 15:38:39.000000000 +0200
@@ -222,15 +222,16 @@
 
 \par Compiler Flags
 
-\li \e GCC: The compiler should be called with the -march=\<target\> flag. 
Take a look at the GCC
-manpage to find all possibilities for \<target\>. Additionally it is best to 
also add the -msse2
--msse3 ... -mavx flags. If no SIMD instructions are enabled via compiler 
flags, %Vc must fall back
+\li \e GCC: The compiler should be called with the `-march=\<target\>` flag. 
Take a look at the GCC
+manpage to find all possibilities for `\<target\>`.
+If no SIMD instructions are enabled via compiler flags, %Vc must fall back
 to the scalar implementation.
 \li \e Clang: The same as for GCC applies.
-\li \e ICC: Same as GCC, but the flags are called -xAVX -xSSE4.2 -xSSE4.1 
-xSSSE3 -xSSE3 -xSSE2.
-\li \e MSVC: On 32bit you can add the /arch:SSE2 flag. That's about all the 
MSVC documentation
-says. Still the MSVC compiler knows about the newer instructions in SSE3 and 
upwards. How you can
-determine what CPUs will be supported by the resulting binary is unclear.
+\li \e ICC: The same as for GCC applies (at least on Linux).
+\li \e MSVC: For 32-bit targets, the compiler supports the `/arch:SSE` and 
`/arch:SSE2`
+flags. It is undocumented when (or whether at all) SSE3, SSSE3, SSE4a, SSE4.1, 
or SSE4.2
+ISA extensions are used with these flags.
+For all x86 targets, the `/arch:AVX` and `/arch:AVX2` flags are supported.
 
 \par Where does the final executable run?
 
@@ -429,6 +430,7 @@
 \li SSE+XOP+FMA4
 \li AVX
 \li AVX+XOP+FMA4
+\li AVX2+FMA+BMI2
 
 \section buildsystem_other Using Vc without CMake
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/examples/simdize/main.cpp 
new/Vc-1.4.2/examples/simdize/main.cpp
--- old/Vc-1.4.1/examples/simdize/main.cpp      2018-11-19 13:14:38.000000000 
+0100
+++ new/Vc-1.4.2/examples/simdize/main.cpp      2021-06-22 15:38:39.000000000 
+0200
@@ -1,3 +1,23 @@
+/*  This file is part of the Vc project
+    Copyright (C) 2009-2020 Matthias Kretz <kr...@kde.org>
+    Permission to use, copy, modify, and distribute this software
+    and its documentation for any purpose and without fee is hereby
+    granted, provided that the above copyright notice appear in all
+    copies and that both that the copyright notice and this
+    permission notice and warranty disclaimer appear in supporting
+    documentation, and that the name of the author not be used in
+    advertising or publicity pertaining to distribution of the
+    software without specific, written prior permission.
+    The author disclaim all warranties with regard to this
+    software, including all implied warranties of merchantability
+    and fitness.  In no event shall the author be liable for any
+    special, indirect or consequential damages or any damages
+    whatsoever resulting from loss of use, data or profits, whether
+    in an action of contract, negligence or other tortious action,
+    arising out of or in connection with the use or performance of
+    this software.
+*/
+
 #include <Vc/simdize>
 #include <Vc/IO>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/godbolt/Vc new/Vc-1.4.2/godbolt/Vc
--- old/Vc-1.4.1/godbolt/Vc     2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/godbolt/Vc     2021-06-22 15:38:39.000000000 +0200
@@ -466,8 +466,8 @@
 }
 #ifndef VC_VERSION_H_
 #define VC_VERSION_H_ 
-#define Vc_VERSION_STRING "1.4.0-dev"
-#define Vc_VERSION_NUMBER 0x010401
+#define Vc_VERSION_STRING "1.4.1-dev"
+#define Vc_VERSION_NUMBER 0x010403
 #define Vc_VERSION_CHECK(major,minor,patch) ((major << 16) | (minor << 8) | 
(patch << 1))
 #define Vc_LIBRARY_ABI_VERSION 5
 #define Vc_IS_VERSION_2 (Vc_VERSION_NUMBER >= Vc_VERSION_CHECK(1, 70, 0))
@@ -541,11 +541,11 @@
 {
 template <typename T, typename It = typename T::iterator>
 std::is_base_of<std::random_access_iterator_tag,
-typename It::iterator_category>
+typename std::iterator_traits<It>::iterator_category>
 test(int);
 template <typename T>
 std::is_base_of<std::random_access_iterator_tag,
-typename T::iterator_category>
+typename std::iterator_traits<T>::iterator_category>
 test(long);
 template <typename T> std::false_type test(...);
 }
@@ -585,12 +585,7 @@
 template <typename F, typename A> std::is_const<A> test(void (F::*)(A &&) 
const);
 struct dummy {};
 template <
-typename F, typename A
-#ifdef Vc_ICC
-,
-typename = decltype(std::declval<F &>()(std::declval<dummy &>()))
-#endif
-,
+typename F, typename A,
 #ifdef Vc_MSVC
 #define Vc_TEMPLATE_ 
 #else
@@ -611,12 +606,12 @@
 struct is_functor_argument_immutable;
 template <typename F, typename A>
 struct is_functor_argument_immutable<F, A, false>
-: public decltype(is_functor_argument_immutable_impl::test2<
+: decltype(is_functor_argument_immutable_impl::test2<
 typename std::remove_reference<F>::type, A>(int())) {
 };
 template <typename F, typename A>
 struct is_functor_argument_immutable<F, A, true>
-: public 
decltype(is_functor_argument_immutable_impl::test3(std::declval<F>())) {
+: decltype(is_functor_argument_immutable_impl::test3(std::declval<F>())) {
 };
 }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/godbolt/algorithm 
new/Vc-1.4.2/godbolt/algorithm
--- old/Vc-1.4.1/godbolt/algorithm      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/godbolt/algorithm      2021-06-22 15:38:39.000000000 +0200
@@ -1182,7 +1182,19 @@
 return fromIteratorImpl<It, V, 0, determine_tuple_size<V>()>(it);
 }
 template <typename It, typename V>
-Vc_INTRINSIC V fromIterator(enable_if<Traits::is_simd_vector<V>::value, It> it)
+Vc_INTRINSIC V fromIterator(
+enable_if<
+Traits::is_simd_vector<V>::value && Traits::has_contiguous_storage<It>::value, 
It>
+it)
+{
+Vc_ASSERT(&*it + 1 == &*(it + 1));
+return V(&*it, Vc::Unaligned);
+}
+template <typename It, typename V>
+Vc_INTRINSIC V fromIterator(enable_if<Traits::is_simd_vector<V>::value &&
+!Traits::has_contiguous_storage<It>::value,
+It>
+it)
 {
 V r;
 for (size_t j = 0; j < V::size(); ++j, ++it) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/makeApidoxLoop.sh 
new/Vc-1.4.2/makeApidoxLoop.sh
--- old/Vc-1.4.1/makeApidoxLoop.sh      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/makeApidoxLoop.sh      2021-06-22 15:38:39.000000000 +0200
@@ -1,7 +1,8 @@
 #!/bin/sh
+cd "`dirname "$0"`"
 test -f .makeApidox.stamp || touch .makeApidox.stamp
 while true; do
-  ls -l -t include/Vc/* doc/dox.h doc/examples.h common/*|head -n1 > 
.makeApidox.stamp.new
+  ls -l -t Vc/* doc/dox.h doc/examples.h Vc/common/*|head -n1 > 
.makeApidox.stamp.new
   if ! diff -q .makeApidox.stamp.new .makeApidox.stamp; then
     ./makeApidox.sh
     mv -f .makeApidox.stamp.new .makeApidox.stamp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/makeRelease.sh new/Vc-1.4.2/makeRelease.sh
--- old/Vc-1.4.1/makeRelease.sh 2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/makeRelease.sh 2021-06-22 15:38:39.000000000 +0200
@@ -32,8 +32,8 @@
 # Modify README.md to link to release docs
 ed README.md <<EOF
 P
-/web-docs/a
-* [$versionString release](https://web-docs.gsi.de/~mkretz/Vc-$versionString/)
+/github.io/a
+* [$versionString release](https://vcdevel.github.io/Vc-$versionString/)
 .
 w
 EOF
@@ -57,8 +57,15 @@
 # Create API docs tarball
 ./makeApidox.sh
 
-# Copy API docs to web-docs
-rsync -a --del doc/html/ lxpool.gsi.de:web-docs/Vc-$versionString/
+# Copy API docs to vcdevel.github.io
+git clone --depth 2 g...@github.com:VcDevel/vcdevel.github.io && \
+cp -a doc/html vcdevel.github.io/Vc-$versionString && \
+cd vcdevel.github.io && \
+git add Vc-$versionString && \
+git commit -m "Add Vc $versionString release docs" && \
+git push && \
+cd .. && \
+rm -r vcdevel.github.io
 
 # Create API docs tarball
 mv doc/html/*.qch "../Vc-${versionString}.qch"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/tests/gather.cpp 
new/Vc-1.4.2/tests/gather.cpp
--- old/Vc-1.4.1/tests/gather.cpp       2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/tests/gather.cpp       2021-06-22 15:38:39.000000000 +0200
@@ -112,14 +112,15 @@
 
     const int count = 39999;
     T array[count];
+    using value_type = typename V::value_type;
+    using limits = typename std::conditional<
+        (std::is_floating_point<T>::value && 
std::is_integral<value_type>::value),
+        std::numeric_limits<value_type>, std::numeric_limits<T>>::type;
+    const T max = static_cast<T>(limits::max());
     for (int i = 0; i < count; ++i) {
-        using value_type = typename V::value_type;
-        using limits = typename std::conditional<
-            (std::is_floating_point<T>::value && 
std::is_integral<value_type>::value),
-            std::numeric_limits<value_type>, std::numeric_limits<T>>::type;
         T tmp = i + 1;
-        while (tmp > limits::max()) {
-            tmp -= limits::max();
+        while (tmp > max) {
+            tmp -= max;
         }
         array[i] = tmp;
     }
@@ -166,13 +167,14 @@
     gatherArrayImpl<Vec, double>();
 }
 
-template<typename T, std::size_t Align> struct Struct
+template <typename T, size_t Align = std::is_arithmetic<T>::value ? sizeof(T) 
: alignof(T)>
+struct alignas(Align > alignof(short) ? Align : alignof(short)) Struct
 {
-    alignas(Align) T a;
+    T a;
     char x;
-    alignas(Align) T b;
+    T b;
     short y;
-    alignas(Align) T c;
+    T c;
     char z;
 };
 
@@ -180,7 +182,7 @@
 {
     typedef typename Vec::IndexType It;
     typedef typename Vec::EntryType T;
-    typedef Struct<T, alignof(T)> S;
+    typedef Struct<T> S;
     constexpr int count = 3999;
     Vc::array<S, count> array;
     Vc::span<S, count> s(array);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/tests/math.cpp new/Vc-1.4.2/tests/math.cpp
--- old/Vc-1.4.1/tests/math.cpp 2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/tests/math.cpp 2021-06-22 15:38:39.000000000 +0200
@@ -29,6 +29,7 @@
 #include <Vc/array>
 #include "vectormemoryhelper.h"
 #include <cmath>
+#include <cstdlib>
 #include <algorithm>
 #include <Vc/common/const.h>
 /*}}}*/
@@ -53,8 +54,18 @@
         COMPARE(a, Vc::abs(a));
         COMPARE(a, Vc::abs(b));
     }
+    using T = typename V::value_type;
+    if (std::is_same<T, short>::value)
+    {
+        const V a = std::numeric_limits<T>::lowest();
+        COMPARE(abs(a), a);
+    }
     for (int i = 0; i < 1000; ++i) {
-        const V a = V::Random();
+        V a = V::Random();
+        if (std::is_integral<T>::value) {
+            // Avoid most negative value which doesn't have an absolute value.
+            a = max(a, V(std::numeric_limits<T>::min() + 1));
+        }
         const V ref = V::generate([&](int j) { return std::abs(a[j]); });
         COMPARE(abs(a), ref) << "a : " << a;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/tests/scatter.cpp 
new/Vc-1.4.2/tests/scatter.cpp
--- old/Vc-1.4.1/tests/scatter.cpp      2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/tests/scatter.cpp      2021-06-22 15:38:39.000000000 +0200
@@ -100,20 +100,22 @@
     });
 }
 
-template<typename T, std::size_t Align> struct Struct //{{{1
+//struct Struct {{{1
+template <typename T, size_t Align = std::is_arithmetic<T>::value ? sizeof(T) 
: alignof(T)>
+struct alignas(Align > alignof(short) ? Align : alignof(short)) Struct
 {
-    alignas(Align) T a;
+    T a;
     char x;
-    alignas(Align) T b;
+    T b;
     short y;
-    alignas(Align) T c;
+    T c;
     char z;
 };
 
 TEST_TYPES(Vec, scatterStruct, AllTypes) //{{{1
 {
     typedef typename Vec::IndexType It;
-    typedef Struct<typename Vec::EntryType, sizeof(typename Vec::EntryType)> S;
+    typedef Struct<typename Vec::EntryType> S;
     constexpr int count = 3999;
     Vc::array<S, count> array, out;
     memset(&array[0], 0, count * sizeof(S));
@@ -136,23 +138,23 @@
     VERIFY(0 == memcmp(&array[0], &out[0], count * sizeof(S)));
 }
 
-template<typename T, std::size_t Align> struct Struct2 //{{{1
+template<typename T> struct Struct2 //{{{1
 {
     char x;
-    Struct<T, Align> b;
+    Struct<T> b;
     short y;
 };
 
 constexpr int scatterStruct2Count = 97;
 
-template<typename T, std::size_t Align>
-static std::ostream &operator<<(std::ostream &out, const Struct2<T, Align> &s)
+template<typename T>
+static std::ostream &operator<<(std::ostream &out, const Struct2<T> &s)
 {
     return out << '{' << s.b.a << ' ' << s.b.b << ' ' << s.b.c << '}';
 }
 
-template<typename T, std::size_t Align>
-static std::ostream &operator<<(std::ostream &out, const Struct2<T, Align> *s)
+template<typename T>
+static std::ostream &operator<<(std::ostream &out, const Struct2<T> *s)
 {
     for (int i = 0; i < scatterStruct2Count; ++i) {
         out << s[i];
@@ -178,8 +180,8 @@
 TEST_TYPES(Vec, scatterStruct2, AllTypes) //{{{1
 {
     typedef typename Vec::IndexType It;
-    typedef Struct2<typename Vec::EntryType, sizeof(typename Vec::EntryType)> 
S1;
-    typedef Struct<typename Vec::EntryType, sizeof(typename Vec::EntryType)> 
S2;
+    typedef Struct2<typename Vec::EntryType> S1;
+    typedef Struct<typename Vec::EntryType> S2;
     Vc::array<S1, scatterStruct2Count> array, out;
     memset(&array[0], 0, scatterStruct2Count * sizeof(S1));
     memset(&out[0], 0, scatterStruct2Count * sizeof(S1));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.4.1/tests/subscript.cpp 
new/Vc-1.4.2/tests/subscript.cpp
--- old/Vc-1.4.1/tests/subscript.cpp    2018-11-19 13:14:38.000000000 +0100
+++ new/Vc-1.4.2/tests/subscript.cpp    2021-06-22 15:38:39.000000000 +0200
@@ -164,7 +164,9 @@
     }
 }
 
-template <typename T, std::size_t Align = alignof(T)> struct S {
+template <typename T, size_t Align = std::is_arithmetic<T>::value ? sizeof(T) 
: alignof(T)>
+struct alignas(Align > alignof(double) ? Align : alignof(double)) S
+{
     void operator=(int x)
     {
         a = x;
@@ -172,11 +174,11 @@
         c = x + 2;
     }
     double x0;
-    alignas(Align) T a;
+    T a;
     char x1;
-    alignas(Align) T b;
+    T b;
     short x2;
-    alignas(Align) T c;
+    T c;
     char x3;
 };
 
@@ -184,7 +186,7 @@
 {
     typedef typename V::EntryType T;
     typedef typename V::IndexType IT;
-    Vc::array<S<T, alignof(T)>, 256> data1;
+    Vc::array<S<T>, 256> data1;
     Vc::array<S<S<T>>, 256> data2;
     Vc::array<S<S<S<T>>>, 256> data3;
     Vc::array<S<S<S<S<T>>>>, 256> data4;

Reply via email to