aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/variant/variant.hpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2018-07-13 12:33:46 +0200
committerDavid Schulz <david.schulz@qt.io>2018-09-03 08:00:46 +0000
commitd61d29cf16745f50a4e77a8ed268a72dfafa0d0d (patch)
treedc251026ec4c996686a96dee5867ca57ef52719a /src/libs/3rdparty/variant/variant.hpp
parent8749ccc69f01b9e968ce58d92dd53f351293a0d6 (diff)
Introduce a basic client for the language server protocol
The language server protocol is used to transport language specific information needed to efficiently edit source files. For example completion, go to operations and symbol information. These information are transferred via JSON-RPC. The complete definition can be found under https://microsoft.github.io/language-server-protocol/specification. This language server protocol support consists of two major parts, the C++ representation of the language server protocol, and the client part for the communication with an external language server. The TypeScript definitions of the protocol interfaces are transferred to C++ classes. Those classes have getter and setter for every interface value. Optional values from the protocol are represented by Utils::optional<ValueType>. The JSON objects that are used to transfer the data between client and server are hidden by a specialized JsonObject class derived from QJsonObject. Additionally this JsonObject provides a validity check that is capable of creating a detailed error message for malformed, or at least unexpected JSON representation of the protocol. The client is the interface between Qt Creator and language server functionality, like completion, diagnostics, document and workspace synchronization. The base client converts the data that is sent from/to the server between the raw byte array and the corresponding C++ objects. The transportat layer is defined in a specialized base client (this initial change will only support stdio language server). The running clients are handled inside the language client manager, which is also used to connect global and exclusive Qt Creator functionality to the clients. Task-number: QTCREATORBUG-20284 Change-Id: I8e123e20c3f14ff7055c505319696d5096fe1704 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/3rdparty/variant/variant.hpp')
-rw-r--r--src/libs/3rdparty/variant/variant.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libs/3rdparty/variant/variant.hpp b/src/libs/3rdparty/variant/variant.hpp
index 42f018447e..29d7feb29f 100644
--- a/src/libs/3rdparty/variant/variant.hpp
+++ b/src/libs/3rdparty/variant/variant.hpp
@@ -243,8 +243,10 @@ namespace std {
#endif
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
+#if !defined(_MSC_VER) || _MSC_VER < 1915 // compile issue in msvc 2017 update 8
#define MPARK_CPP14_CONSTEXPR
#endif
+#endif
#if __has_feature(cxx_exceptions) || defined(__cpp_exceptions) || \
(defined(_MSC_VER) && defined(_CPPUNWIND))
@@ -1883,8 +1885,7 @@ namespace mpark {
template <
typename Front = lib::type_pack_element_t<0, Ts...>,
lib::enable_if_t<std::is_default_constructible<Front>::value, int> = 0>
- inline constexpr variant() noexcept(
- std::is_nothrow_default_constructible<Front>::value)
+ inline constexpr variant()
: impl_(in_place_index_t<0>{}) {}
variant(const variant &) = default;
@@ -1976,9 +1977,7 @@ namespace mpark {
lib::enable_if_t<(std::is_assignable<T &, Arg>::value &&
std::is_constructible<T, Arg>::value),
int> = 0>
- inline variant &operator=(Arg &&arg) noexcept(
- (std::is_nothrow_assignable<T &, Arg>::value &&
- std::is_nothrow_constructible<T, Arg>::value)) {
+ inline variant &operator=(Arg &&arg) {
impl_.template assign<I>(lib::forward<Arg>(arg));
return *this;
}