netlist: Fixed a couple of issues with various compilers.

This commit is contained in:
couriersud 2020-09-24 07:54:07 +02:00
parent 0acb9992f4
commit a6fb699b6f
6 changed files with 25 additions and 3 deletions

View File

@ -117,7 +117,10 @@
<ClCompile Include="..\devices\nld_2102A.cpp" /> <ClCompile Include="..\devices\nld_2102A.cpp" />
<ClCompile Include="..\devices\nld_4006.cpp" /> <ClCompile Include="..\devices\nld_4006.cpp" />
<ClCompile Include="..\devices\nld_4017.cpp" /> <ClCompile Include="..\devices\nld_4017.cpp" />
<ClCompile Include="..\devices\nld_4029.cpp" />
<ClCompile Include="..\devices\nld_4042.cpp" />
<ClCompile Include="..\devices\nld_4053.cpp" /> <ClCompile Include="..\devices\nld_4053.cpp" />
<ClCompile Include="..\devices\nld_4076.cpp" />
<ClCompile Include="..\devices\nld_74125.cpp" /> <ClCompile Include="..\devices\nld_74125.cpp" />
<ClCompile Include="..\devices\nld_74163.cpp" /> <ClCompile Include="..\devices\nld_74163.cpp" />
<ClCompile Include="..\devices\nld_74377.cpp" /> <ClCompile Include="..\devices\nld_74377.cpp" />
@ -176,6 +179,8 @@
<ClCompile Include="..\devices\nlid_truthtable.cpp" /> <ClCompile Include="..\devices\nlid_truthtable.cpp" />
<ClCompile Include="..\generated\nlm_modules_lib.cpp" /> <ClCompile Include="..\generated\nlm_modules_lib.cpp" />
<ClCompile Include="..\generated\static_solvers.cpp" /> <ClCompile Include="..\generated\static_solvers.cpp" />
<ClCompile Include="..\macro\modules\nlmod_ICL8038_DIP.cpp" />
<ClCompile Include="..\macro\modules\nlmod_NE556_DIP.cpp" />
<ClCompile Include="..\macro\modules\nlmod_RTEST.cpp" /> <ClCompile Include="..\macro\modules\nlmod_RTEST.cpp" />
<ClCompile Include="..\macro\nlm_base_lib.cpp" /> <ClCompile Include="..\macro\nlm_base_lib.cpp" />
<ClCompile Include="..\macro\nlm_cd4xxx_lib.cpp" /> <ClCompile Include="..\macro\nlm_cd4xxx_lib.cpp" />

View File

@ -294,6 +294,21 @@
<ClCompile Include="..\macro\modules\nlmod_RTEST.cpp"> <ClCompile Include="..\macro\modules\nlmod_RTEST.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\devices\nld_4042.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\devices\nld_4076.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\devices\nld_4029.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\macro\modules\nlmod_ICL8038_DIP.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\macro\modules\nlmod_NE556_DIP.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\nl_errstr.h"> <ClInclude Include="..\nl_errstr.h">

View File

@ -39,7 +39,7 @@ namespace plib {
public: public:
explicit pexception(const pstring &text); explicit pexception(const pstring &text);
const pstring &text() const noexcept { return m_text; } const putf8string &text() const noexcept { return m_text; }
const char* what() const noexcept override { return m_text.c_str(); } const char* what() const noexcept override { return m_text.c_str(); }
private: private:

View File

@ -70,7 +70,8 @@ namespace plib {
// FIXME: need native support at some time // FIXME: need native support at some time
static constexpr const bool is_signed = true; static constexpr const bool is_signed = true;
static char32_t fmt_spec() { return 'd'; } static char32_t fmt_spec() { return 'd'; }
static void streamify(std::ostream &s, const compile_info::int128_type &v) template <typename T, typename = std::enable_if_t<plib::is_arithmetic<T>::value>>
static void streamify(std::ostream &s, const T &v)
{ {
s << narrow_cast<long long>(v); s << narrow_cast<long long>(v);
} }

View File

@ -271,7 +271,7 @@ namespace plib
/// FIXME: limited implementation /// FIXME: limited implementation
/// ///
template <typename T1, typename T2> template <typename T1, typename T2>
static static inline
auto pow(T1 v, T2 p) noexcept -> decltype(std::pow(v, p)) auto pow(T1 v, T2 p) noexcept -> decltype(std::pow(v, p))
{ {
return std::pow(v, p); return std::pow(v, p);

View File

@ -63,6 +63,7 @@ namespace plib
constexpr explicit ptime(const ptime<O, RES> &rhs, T dummy = 0) noexcept constexpr explicit ptime(const ptime<O, RES> &rhs, T dummy = 0) noexcept
: m_time(static_cast<TYPE>(rhs.m_time)) : m_time(static_cast<TYPE>(rhs.m_time))
{ {
plib::unused_var(dummy);
} }
template <typename O> template <typename O>