Skip to content

Commit

Permalink
Merge pull request #200 from SylvainCorlay/update-xeus
Browse files Browse the repository at this point in the history
Update xeus and document windows workaround
  • Loading branch information
SylvainCorlay committed Oct 23, 2020
2 parents 61b2694 + 227a624 commit 3b1f204
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install:
- conda update -q conda
- conda info -a
# Install host dependencies
- conda install xeus=0.24.1 cppzmq xproperty=0.10.0 nlohmann_json -c conda-forge
- conda install xeus=0.24.2 cppzmq xproperty=0.10.0 nlohmann_json -c conda-forge
# Install build dependencies
- conda install cmake -c conda-forge
- cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -DDOWNLOAD_GTEST=ON .
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Install host dependencies
- conda install xeus=0.24.1 cppzmq xproperty=0.10.0 nlohmann_json -c conda-forge
- conda install xeus=0.24.2 cppzmq xproperty=0.10.0 nlohmann_json -c conda-forge
# Install build dependencies
- conda install cmake -c conda-forge
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand Down
7 changes: 7 additions & 0 deletions docs/source/compilers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ the implementation of ``Foo``, ``Bar`` should be a template, and not refer to
``Bar<Foo<T>>``. However, unlike GCC and Clang, Visual Studio incorrectly makes
``Bar`` refer to the fully specialized template type.

Visual Studio and ambiguous calls to base constructors in mixins
----------------------------------------------------------------

In ``xobject.hpp``, we explicitely define constructors instead of making use of the
``using`` statement for the base constructor because MSVC wrongly reports that the
call to the base class constructor is ambiguous in derived classes.

.. _`MSVC issue`: https://developercommunity.visualstudio.com/content/problem/208938/compilation-error-c2057-expected-constant-expressi.html
9 changes: 8 additions & 1 deletion include/xwidgets/xobject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define XOBJECT_HPP

#include <string>
#include <unordered_map>

#include "xtl/xoptional.hpp"
#include "xtl/xjson.hpp"
Expand Down Expand Up @@ -50,8 +49,14 @@ namespace xw

protected:

// MSVC wrongly raises compiler error C2385 over ambiguous call to constructor
// without this workaround.
#ifdef _WIN32
xobject();
xobject(xeus::xcomm&&, bool owning = false);
#else
using base_type::base_type;
#endif
};

/*******************************
Expand Down Expand Up @@ -80,6 +85,7 @@ namespace xw
set_property_from_patch(_view_name, patch, buffers);
}

#ifdef _WIN32
template <class D>
inline xobject<D>::xobject()
: base_type()
Expand All @@ -91,6 +97,7 @@ namespace xw
: base_type(std::move(com), owning)
{
}
#endif
}

#endif
8 changes: 8 additions & 0 deletions src/xbox.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/***************************************************************************
* Copyright (c) 2017, Sylvain Corlay and Johan Mabille *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/

#include "xwidgets/xbox.hpp"

namespace xw
Expand Down
8 changes: 8 additions & 0 deletions src/xtab.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/***************************************************************************
* Copyright (c) 2017, Sylvain Corlay and Johan Mabille *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/

#include "xwidgets/xtab.hpp"

namespace xw
Expand Down

0 comments on commit 3b1f204

Please sign in to comment.