diff options
author | couriersud <couriersud@gmx.org> | 2017-04-09 04:25:49 +0200 |
---|---|---|
committer | couriersud <couriersud@gmx.org> | 2017-04-09 04:25:49 +0200 |
commit | a55419d48583454c555f2c6a45c75d312be9af76 (patch) | |
tree | 90e07336472a973bddb43af2c148b5ef004b832f /src/lib/netlist | |
parent | 5a24cab4456396bbc22757bf74936e08126d8842 (diff) |
Fix VS2015 build. (nw)
Diffstat (limited to 'src/lib/netlist')
-rwxr-xr-x[-rw-r--r--] | src/lib/netlist/nl_base.h | 2 | ||||
-rwxr-xr-x | src/lib/netlist/plib/pconfig.h | 7 | ||||
-rwxr-xr-x | src/lib/netlist/prg/nltool.cpp | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | src/lib/netlist/solver/nld_ms_gcr.h | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 63eb469db8b..7afed824630 100644..100755 --- 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<analog_net_t *>; - 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 index 7e8e233d1cc..744bca452ad 100644..100755 --- 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<m_N, storage_N>::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 { |