mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Visual Studio 2013 compilation fixes.
- Missing header file callouts in some cases (library deltas) - Lack of support for auto parameters in lambdas - Defining of ERROR by windows.h - Dispatcher::Connection needs a move constructor (default not generated) - Need explicit enable_if on std::string move template in Value to avoid trying to move const char[] (string literal) - Compile flags
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#define LLVM_ADT_STRINGEXTRAS_H
|
||||
|
||||
#include "llvm/StringRef.h"
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@@ -10,7 +10,8 @@ class NetworkTable : public ITable {
|
||||
struct private_init {};
|
||||
|
||||
std::string m_path;
|
||||
std::vector<std::pair<ITableListener*, unsigned int>> m_listeners;
|
||||
typedef std::pair<ITableListener*, unsigned int> Listener;
|
||||
std::vector<Listener> m_listeners;
|
||||
|
||||
static std::string s_ip_address;
|
||||
static bool s_client;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include "llvm/ArrayRef.h"
|
||||
@@ -103,7 +104,7 @@ class Value {
|
||||
val->m_val.data.v_string.len = val->m_string.size();
|
||||
return val;
|
||||
}
|
||||
template <typename T>
|
||||
template <typename T, typename = std::enable_if_t<std::is_same<T, std::string>>>
|
||||
static std::shared_ptr<Value> MakeString(T&& value) {
|
||||
auto val = std::make_shared<Value>(NT_STRING, private_init());
|
||||
val->m_string = std::move(value);
|
||||
@@ -118,7 +119,7 @@ class Value {
|
||||
val->m_val.data.v_raw.len = val->m_string.size();
|
||||
return val;
|
||||
}
|
||||
template <typename T>
|
||||
template <typename T, typename = std::enable_if_t<std::is_same<T, std::string>>>
|
||||
static std::shared_ptr<Value> MakeRaw(T&& value) {
|
||||
auto val = std::make_shared<Value>(NT_RAW, private_init());
|
||||
val->m_string = std::move(value);
|
||||
|
||||
Reference in New Issue
Block a user