From a55419d48583454c555f2c6a45c75d312be9af76 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 9 Apr 2017 04:25:49 +0200 Subject: Fix VS2015 build. (nw) --- src/lib/netlist/nl_base.h | 2 +- src/lib/netlist/plib/pconfig.h | 7 +++++++ src/lib/netlist/prg/nltool.cpp | 8 ++++++++ src/lib/netlist/solver/nld_ms_gcr.h | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/lib/netlist/nl_base.h mode change 100644 => 100755 src/lib/netlist/solver/nld_ms_gcr.h diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h old mode 100644 new mode 100755 index 63eb469db8b..7afed824630 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -821,7 +821,7 @@ namespace netlist using list_t = std::vector; - friend class net_t; + friend class detail::net_t; analog_net_t(netlist_t &nl, const pstring &aname, detail::core_terminal_t *mr = nullptr); diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index 20828451b33..0200c305ecd 100755 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -40,6 +40,11 @@ * C++14: __cplusplus is 201402L. * c++17/c++1z__cplusplus is 201703L. * + * VS2015 returns 199711L here. This is the bug filed in + * 2012 which obviously never was picked up by MS: + * https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l + * + * *============================================================*/ #if __cplusplus == 201103L @@ -48,6 +53,8 @@ #define C14CONSTEXPR constexpr #elif __cplusplus == 201703L #define C14CONSTEXPR constexpr +#elif defined(_MSC_VER) +#define C14CONSTEXPR #else #error "C++ version not supported" #endif diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index c69fb55a8e3..675117bdd09 100755 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -770,6 +770,14 @@ int tool_app_t::execute() { perr("plib exception caught: {}\n", e.text()); } + +#if 0 +#define str(x) # x +#define strx(x) str(x) +#define ttt strx(__cplusplus) + printf("%s\n", ttt); +#endif + return 0; } diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h old mode 100644 new mode 100755 index 7e8e233d1cc..744bca452ad --- a/src/lib/netlist/solver/nld_ms_gcr.h +++ b/src/lib/netlist/solver/nld_ms_gcr.h @@ -388,7 +388,7 @@ unsigned matrix_solver_GCR_t::vsolve_non_dynamic(const bool newt if (m_proc.resolved()) { //static_solver(m_A, RHS); - m_proc(mat.A, RHS, new_V); + m_proc(&mat.A[0], &RHS[0], &new_V[0]); } else { -- cgit v1.2.3