Fix VS2015 build. (nw)

This commit is contained in:
couriersud 2017-04-09 04:25:49 +02:00
parent 5a24cab445
commit a55419d485
4 changed files with 17 additions and 2 deletions

2
src/lib/netlist/nl_base.h Normal file → Executable file
View File

@ -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);

View File

@ -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

View File

@ -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;
}

2
src/lib/netlist/solver/nld_ms_gcr.h Normal file → Executable file
View File

@ -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
{