Hello community,

here is the log from the commit of package xtl for openSUSE:Factory checked in 
at 2020-08-18 12:00:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xtl (Old)
 and      /work/SRC/openSUSE:Factory/.xtl.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xtl"

Tue Aug 18 12:00:41 2020 rev:2 rq:827395 version:0.6.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/xtl/xtl.changes  2020-04-27 23:37:55.723470609 
+0200
+++ /work/SRC/openSUSE:Factory/.xtl.new.3399/xtl.changes        2020-08-18 
12:02:55.639422522 +0200
@@ -1,0 +2,10 @@
+Mon Aug 17 17:01:32 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 0.6.16:
+  - Fixed mpark variant inclusion guards
+  - Add a serialiser for xvariant to json
+  - Removed capture all by reference
+  - Renamed mpark variant header inclusion guard
+  - Implemented value iterator for map containers
+
+-------------------------------------------------------------------

Old:
----
  xtl-0.6.13.tar.gz

New:
----
  xtl-0.6.16.tar.gz

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

Other differences:
------------------
++++++ xtl.spec ++++++
--- /var/tmp/diff_new_pack.N0CW6q/_old  2020-08-18 12:02:57.255422742 +0200
+++ /var/tmp/diff_new_pack.N0CW6q/_new  2020-08-18 12:02:57.259422743 +0200
@@ -17,16 +17,16 @@
 
 
 Name:           xtl
-Version:        0.6.13
+Version:        0.6.16
 Release:        0
 Summary:        The x template library
 License:        BSD-3-Clause
 URL:            https://github.com/xtensor-stack/xtl
 Source:         
https://github.com/xtensor-stack/xtl/archive/%{version}.tar.gz#/xtl-%{version}.tar.gz
 BuildRequires:  cmake
-BuildRequires:  cmake(nlohmann_json)
 BuildRequires:  gcc-c++
 BuildRequires:  pkg-config
+BuildRequires:  cmake(nlohmann_json)
 
 %description
 Basic tools (containers, algorithms) used by other quantstack packages.

++++++ xtl-0.6.13.tar.gz -> xtl-0.6.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/.appveyor.yml new/xtl-0.6.16/.appveyor.yml
--- old/xtl-0.6.13/.appveyor.yml        2020-03-09 09:49:18.000000000 +0100
+++ new/xtl-0.6.16/.appveyor.yml        2020-08-11 11:44:33.000000000 +0200
@@ -1,17 +1,23 @@
 build: false
 
-os: Visual Studio 2015
-
 platform:
   - x64
 
+image:
+  - Visual Studio 2017
+  - Visual Studio 2015
+
 environment:
   matrix:
     - MINICONDA: C:\xtl-conda
 
 init:
   - "ECHO %MINICONDA%"
-  - C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat 
%PLATFORM%
+  - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" set 
VCVARPATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
+  - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" set 
VCARGUMENT=%PLATFORM%
+  - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" set 
VCVARPATH="C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
+  - echo "%VCVARPATH% %VCARGUMENT%"
+  - "%VCVARPATH% %VCARGUMENT%"
   - ps: if($env:Platform -eq "x64"){Start-FileDownload 
'http://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe' 
C:\Miniconda.exe; echo "Done"}
   - ps: if($env:Platform -eq "x86"){Start-FileDownload 
'http://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86.exe' 
C:\Miniconda.exe; echo "Done"}
   - cmd: C:\Miniconda.exe /S /D=C:\xtl-conda
@@ -23,8 +29,7 @@
   - conda info -a
   - conda env create --file environment-dev.yml
   - CALL conda.bat activate xtl
-  - conda install gtest==1.10.0 -c conda-forge
-  - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY 
-DBUILD_TESTS=ON .
+  - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY 
-DDOWNLOAD_GTEST=ON .
   - nmake test_xtl
   - cd test
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/.azure-pipelines/azure-pipelines-osx.yml 
new/xtl-0.6.16/.azure-pipelines/azure-pipelines-osx.yml
--- old/xtl-0.6.13/.azure-pipelines/azure-pipelines-osx.yml     2020-03-09 
09:49:18.000000000 +0100
+++ new/xtl-0.6.16/.azure-pipelines/azure-pipelines-osx.yml     2020-08-11 
11:44:33.000000000 +0200
@@ -17,7 +17,7 @@
           echo "Removing homebrew for Azure to avoid conflicts with conda"
           curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/master/uninstall > 
~/uninstall_homebrew
           chmod +x ~/uninstall_homebrew
-          ~/uninstall_homebrew -fq
+          ~/uninstall_homebrew -f -q
         displayName: Remove homebrew
 
       - bash: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/.azure-pipelines/azure-pipelines-win.yml 
new/xtl-0.6.16/.azure-pipelines/azure-pipelines-win.yml
--- old/xtl-0.6.13/.azure-pipelines/azure-pipelines-win.yml     2020-03-09 
09:49:18.000000000 +0100
+++ new/xtl-0.6.16/.azure-pipelines/azure-pipelines-win.yml     2020-08-11 
11:44:33.000000000 +0200
@@ -2,7 +2,7 @@
 jobs:
   - job: 'Windows_clangcl'
     pool:
-      vmImage: 'vs2015-win2012r2'
+      vmImage: 'vs2017-win2016'
     timeoutInMinutes: 360
     steps:
 
@@ -34,8 +34,7 @@
       # Create conda enviroment
       # Note: conda activate doesn't work here, because it creates a new shell!
       - script: |
-          conda install cmake ^
-                        gtest ^
+          conda install cmake==3.14.0 ^
                         ninja ^
                         nlohmann_json ^
                         python=3.6
@@ -60,7 +59,7 @@
                 -DCMAKE_BUILD_TYPE=Release ^
                 -DCMAKE_C_COMPILER=clang-cl ^
                 -DCMAKE_CXX_COMPILER=clang-cl ^
-                -DBUILD_TESTS=ON ^
+                -DDOWNLOAD_GTEST=ON ^
                 $(Build.SourcesDirectory)
         displayName: "Configure xtl"
         workingDirectory: $(Build.BinariesDirectory)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/.github/PULL_REQUEST_TEMPLATE.md 
new/xtl-0.6.16/.github/PULL_REQUEST_TEMPLATE.md
--- old/xtl-0.6.13/.github/PULL_REQUEST_TEMPLATE.md     2020-03-09 
09:49:18.000000000 +0100
+++ new/xtl-0.6.16/.github/PULL_REQUEST_TEMPLATE.md     2020-08-11 
11:44:33.000000000 +0200
@@ -1,10 +1,8 @@
-**Please check if your PR fulfills these requirements**
+# Checklist
 
 - The title and the commit message(s) are descriptive
 - Small commits made to fix your PR have been squashed to avoid history 
pollution
 - Tests have been added for new features or bug fixes
 - API of new functions and classes are documented
-- If you PR introduces backward incompatible changes, update the version number
-in include/xtl/xtl_config.hpp according to the following rules:
-    - if XTL_VERSION_PATCH is already 0-dev, you have nothing to do
-    - otherwise, set XTL_VERSION_PATCH to 0-dev and increase XTL_VERSION_MINOR 
by 1
+
+# Description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/.travis.yml new/xtl-0.6.16/.travis.yml
--- old/xtl-0.6.13/.travis.yml  2020-03-09 09:49:18.000000000 +0100
+++ new/xtl-0.6.16/.travis.yml  2020-08-11 11:44:33.000000000 +0200
@@ -51,7 +51,7 @@
             - g++-9
       env: COMPILER=gcc GCC=9
     - os: osx
-      osx_image: xcode8
+      osx_image: xcode9
       compiler: clang
 env:
   global:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/README.md new/xtl-0.6.16/README.md
--- old/xtl-0.6.13/README.md    2020-03-09 09:49:18.000000000 +0100
+++ new/xtl-0.6.16/README.md    2020-08-11 11:44:33.000000000 +0200
@@ -1,6 +1,6 @@
 # ![xtl](docs/source/xtl.svg)
 
-[![Travis](https://travis-ci.org/xtensor-stack/xtl.svg?branch=master)](https://travis-ci.org/xtensor-stack/xtl)
+[![Travis](https://travis-ci.com/xtensor-stack/xtl.svg?branch=master)](https://travis-ci.com/xtensor-stack/xtl)
 
[![Appveyor](https://ci.appveyor.com/api/projects/status/wikc50xlb5rbrjy7?svg=true)](https://ci.appveyor.com/project/xtensor-stack/xtl)
 
[![Azure](https://dev.azure.com/xtensor-stack/xtensor-stack/_apis/build/status/xtensor-stack.xtl?branchName=master)](https://dev.azure.com/xtensor-stack/xtensor-stack/_build/latest?definitionId=2&branchName=master)
 [![Documentation 
Status](http://readthedocs.org/projects/xtl/badge/?version=latest)](https://xtl.readthedocs.io/en/latest/?badge=latest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/docs/environment.yml 
new/xtl-0.6.16/docs/environment.yml
--- old/xtl-0.6.13/docs/environment.yml 2020-03-09 09:49:18.000000000 +0100
+++ new/xtl-0.6.16/docs/environment.yml 2020-08-11 11:44:33.000000000 +0200
@@ -5,3 +5,4 @@
 
 dependencies:
   - breathe
+  - sphinx=2.4.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/docs/source/changelog.rst 
new/xtl-0.6.16/docs/source/changelog.rst
--- old/xtl-0.6.13/docs/source/changelog.rst    2020-03-09 09:49:18.000000000 
+0100
+++ new/xtl-0.6.16/docs/source/changelog.rst    2020-08-11 11:44:33.000000000 
+0200
@@ -7,6 +7,23 @@
 Changelog
 =========
 
+0.6.16
+------
+
+- Fixed mpark variant inclusion guards
+- Add a serialiser for xvariant to json
+- Removed capture all by reference
+
+0.6.15
+------
+
+- Renamed mpark variant header inclusion guard
+
+0.6.14
+------
+
+- Implemented value iterator for map containers
+
 0.6.13
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/include/xtl/xiterator_base.hpp 
new/xtl-0.6.16/include/xtl/xiterator_base.hpp
--- old/xtl-0.6.13/include/xtl/xiterator_base.hpp       2020-03-09 
09:49:18.000000000 +0100
+++ new/xtl-0.6.16/include/xtl/xiterator_base.hpp       2020-08-11 
11:44:33.000000000 +0200
@@ -230,6 +230,83 @@
         subiterator m_it;
     };
 
+    /*******************
+     * xvalue_iterator *
+     *******************/
+
+    namespace detail
+    {
+        template <class M>
+        struct xvalue_iterator_types
+        {
+            using subiterator = typename M::iterator;
+            using value_type = typename M::mapped_type;
+            using reference = value_type&;
+            using pointer = value_type*;
+            using difference_type = typename subiterator::difference_type;
+        };
+
+        template <class M>
+        struct xvalue_iterator_types<const M>
+        {
+            using subiterator = typename M::const_iterator;
+            using value_type = typename M::mapped_type;
+            using reference = const value_type&;
+            using pointer = const value_type*;
+            using difference_type = typename subiterator::difference_type;
+        };
+   }
+
+    template <class M>
+    class xvalue_iterator : xbidirectional_iterator_base3<xvalue_iterator<M>,
+                                                          
detail::xvalue_iterator_types<M>>
+    {
+    public:
+
+        using self_type = xvalue_iterator<M>;
+        using base_type = xbidirectional_iterator_base3<self_type, 
detail::xvalue_iterator_types<M>>;
+        using value_type = typename base_type::value_type;
+        using reference = typename base_type::reference;
+        using pointer = typename base_type::pointer;
+        using difference_type = typename base_type::difference_type;
+        using subiterator = typename 
detail::xvalue_iterator_types<M>::subiterator;
+
+        inline xvalue_iterator(subiterator it) noexcept
+            : m_it(it)
+        {
+        }
+
+        inline self_type& operator++()
+        {
+            ++m_it;
+            return *this;
+        }
+
+        inline self_type& operator--()
+        {
+            --m_it;
+            return *this;
+        }
+
+        inline reference operator*() const
+        {
+            return m_it->second;
+        }
+
+        inline pointer operator->() const
+        {
+            return&(m_it->second);
+        }
+
+        inline bool operator==(const self_type& rhs) const
+        {
+            return m_it == rhs.m_it;
+        }
+    private:
+
+        subiterator m_it;
+    };
+
     /**********************
      * xstepping_iterator *
      **********************/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/include/xtl/xjson.hpp 
new/xtl-0.6.16/include/xtl/xjson.hpp
--- old/xtl-0.6.13/include/xtl/xjson.hpp        2020-03-09 09:49:18.000000000 
+0100
+++ new/xtl-0.6.16/include/xtl/xjson.hpp        2020-08-11 11:44:33.000000000 
+0200
@@ -17,7 +17,7 @@
 
 #include <cstddef>
 #include <string>
-
+#include "xtl/xvariant.hpp"
 #include "nlohmann/json.hpp"
 
 namespace xtl
@@ -82,4 +82,17 @@
     }
 }
 
+// overloading in the mpark namespace because `xtl::variant` is just a typedef 
on `mpark::variant`
+namespace mpark
+{
+    template <class... Ts>
+    void to_json(nlohmann::json& j, const xtl::variant<Ts...>& data) {
+        xtl::visit
+        (
+            [&j] (const auto & arg) { j = arg; },
+            data
+        );
+    }
+}
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/include/xtl/xtl_config.hpp 
new/xtl-0.6.16/include/xtl/xtl_config.hpp
--- old/xtl-0.6.13/include/xtl/xtl_config.hpp   2020-03-09 09:49:18.000000000 
+0100
+++ new/xtl-0.6.16/include/xtl/xtl_config.hpp   2020-08-11 11:44:33.000000000 
+0200
@@ -12,7 +12,7 @@
 
 #define XTL_VERSION_MAJOR 0
 #define XTL_VERSION_MINOR 6
-#define XTL_VERSION_PATCH 13
+#define XTL_VERSION_PATCH 16
 
 #ifndef __has_feature
 #define __has_feature(x) 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/include/xtl/xvariant_impl.hpp 
new/xtl-0.6.16/include/xtl/xvariant_impl.hpp
--- old/xtl-0.6.13/include/xtl/xvariant_impl.hpp        2020-03-09 
09:49:18.000000000 +0100
+++ new/xtl-0.6.16/include/xtl/xvariant_impl.hpp        2020-08-11 
11:44:33.000000000 +0200
@@ -5,8 +5,11 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE.md or copy at 
http://boost.org/LICENSE_1_0.txt)
 
-#ifndef MPARK_VARIANT_HPP
-#define MPARK_VARIANT_HPP
+// We cannot keep the header guard from mpark variant because
+// this can conflict with other libraries that depend on or embed
+// mpark variant.
+#ifndef XTL_MPARK_VARIANT_HPP
+#define XTL_MPARK_VARIANT_HPP
 
 /*
    variant synopsis
@@ -209,8 +212,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE.md or copy at 
http://boost.org/LICENSE_1_0.txt)
 
-#ifndef MPARK_CONFIG_HPP
-#define MPARK_CONFIG_HPP
+#ifndef XTL_MPARK_CONFIG_HPP
+#define XTL_MPARK_CONFIG_HPP
 
 // MSVC 2015 Update 3.
 #if __cplusplus < 201103L && (!defined(_MSC_VER) || _MSC_FULL_VER < 190024210)
@@ -299,7 +302,7 @@
 #define MPARK_INCOMPLETE_TYPE_TRAITS
 #endif
 
-#endif  // MPARK_CONFIG_HPP
+#endif  // XTL_MPARK_CONFIG_HPP
 
 // MPark.Variant
 //
@@ -308,8 +311,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE.md or copy at 
http://boost.org/LICENSE_1_0.txt)
 
-#ifndef MPARK_IN_PLACE_HPP
-#define MPARK_IN_PLACE_HPP
+#ifndef XTL_MPARK_IN_PLACE_HPP
+#define XTL_MPARK_IN_PLACE_HPP
 
 #include <cstddef>
 
@@ -334,7 +337,7 @@
 
 }  // namespace mpark
 
-#endif  // MPARK_IN_PLACE_HPP
+#endif  // XTL_MPARK_IN_PLACE_HPP
 
 // MPark.Variant
 //
@@ -343,8 +346,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE.md or copy at 
http://boost.org/LICENSE_1_0.txt)
 
-#ifndef MPARK_LIB_HPP
-#define MPARK_LIB_HPP
+#ifndef XTL_MPARK_LIB_HPP
+#define XTL_MPARK_LIB_HPP
 
 #include <memory>
 #include <functional>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/test/CMakeLists.txt 
new/xtl-0.6.16/test/CMakeLists.txt
--- old/xtl-0.6.13/test/CMakeLists.txt  2020-03-09 09:49:18.000000000 +0100
+++ new/xtl-0.6.16/test/CMakeLists.txt  2020-08-11 11:44:33.000000000 +0200
@@ -62,7 +62,7 @@
         add_compile_options(-fno-exceptions)
     endif()
   else() # we are using clang-cl
-    add_compile_options(/EHsc /MP /bigobj -fms-compatibility)
+    add_compile_options(/EHsc /bigobj -fms-compatibility)
     set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
     if (XTL_DISABLE_EXCEPTIONS)
         add_compile_options(/EHs-c-)
@@ -91,6 +91,8 @@
         message(FATAL_ERROR "Build step for googletest failed: ${result}")
     endif()
 
+    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+
     # Add googletest directly to our build. This defines
     # the gtest and gtest_main targets.
     add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/test/test_xiterator_base.cpp 
new/xtl-0.6.16/test/test_xiterator_base.cpp
--- old/xtl-0.6.13/test/test_xiterator_base.cpp 2020-03-09 09:49:18.000000000 
+0100
+++ new/xtl-0.6.16/test/test_xiterator_base.cpp 2020-08-11 11:44:33.000000000 
+0200
@@ -218,6 +218,25 @@
         EXPECT_EQ(it2, iterator(m.end()));
     }
 
+    TEST(xiterator_base, xvalue_iterator)
+    {
+        using map_type = std::map<std::string, int>;
+        map_type m = { {"a", 0}, {"b", 1}, {"c", 2} };
+        using iterator = xvalue_iterator<map_type>;
+
+        iterator it(m.begin());
+        EXPECT_EQ(*it, 0);
+        iterator it2 = it;
+        EXPECT_EQ(it, it2);
+        ++it2;
+        EXPECT_EQ(*it2, 1);
+        EXPECT_NE(it, it2);
+        ++it2;
+        EXPECT_EQ(*it2, 2);
+        ++it2;
+        EXPECT_EQ(it2, iterator(m.end()));
+    }
+
     TEST(xiterator_base, tag_promotion)
     {
         using random_iterator = std::vector<int>::iterator;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xtl-0.6.13/test/test_xvariant.cpp 
new/xtl-0.6.16/test/test_xvariant.cpp
--- old/xtl-0.6.13/test/test_xvariant.cpp       2020-03-09 09:49:18.000000000 
+0100
+++ new/xtl-0.6.16/test/test_xvariant.cpp       2020-08-11 11:44:33.000000000 
+0200
@@ -15,6 +15,10 @@
 #include "gtest/gtest.h"
 #include "xtl/xtl_config.hpp"
 
+#ifdef HAVE_NLOHMANN_JSON
+#include "xtl/xjson.hpp"
+#endif
+
 using namespace std::literals;
 
 namespace xtl
@@ -203,4 +207,22 @@
 
         EXPECT_TRUE(res);
     }
+
+#ifdef HAVE_NLOHMANN_JSON
+    TEST(xvariant, json)
+    {
+        typedef xtl::variant<double, std::string> stringNumType;
+
+        nlohmann::json j1;
+        stringNumType m1 = "Hello";
+        j1["salutation"] = m1;
+        EXPECT_EQ(j1.at("salutation"), "Hello");
+
+        nlohmann::json j2;
+        stringNumType m2 = 3.0;
+        j2["num"] = m2;
+        EXPECT_EQ(j2.at("num"), 3.0);
+    }
+#endif
+
 }


Reply via email to