WIP: enabling build on MSVC2019 with Qt6

This commit is contained in:
klayoutmatthias 2021-12-15 00:31:13 +01:00
parent 626d404d83
commit edd5884a1a
5 changed files with 37 additions and 5 deletions

View File

@ -1119,7 +1119,9 @@ box<C, R>::double_area () const
*/ */
template <class Box> template <class Box>
struct box_left struct box_left
#if __cplusplus < 201703L
: public std::unary_function<Box, typename Box::coord_type> : public std::unary_function<Box, typename Box::coord_type>
#endif
{ {
typename Box::coord_type operator() (const Box &b) const typename Box::coord_type operator() (const Box &b) const
{ {
@ -1132,7 +1134,9 @@ struct box_left
*/ */
template <class Box> template <class Box>
struct box_right struct box_right
#if __cplusplus < 201703L
: public std::unary_function<Box, typename Box::coord_type> : public std::unary_function<Box, typename Box::coord_type>
#endif
{ {
typename Box::coord_type operator() (const Box &b) const typename Box::coord_type operator() (const Box &b) const
{ {
@ -1145,7 +1149,9 @@ struct box_right
*/ */
template <class Box> template <class Box>
struct box_bottom struct box_bottom
#if __cplusplus < 201703L
: public std::unary_function<Box, typename Box::coord_type> : public std::unary_function<Box, typename Box::coord_type>
#endif
{ {
typename Box::coord_type operator() (const Box &b) const typename Box::coord_type operator() (const Box &b) const
{ {
@ -1158,7 +1164,9 @@ struct box_bottom
*/ */
template <class Box> template <class Box>
struct box_top struct box_top
#if __cplusplus < 201703L
: public std::unary_function<Box, typename Box::coord_type> : public std::unary_function<Box, typename Box::coord_type>
#endif
{ {
typename Box::coord_type operator() (const Box &b) const typename Box::coord_type operator() (const Box &b) const
{ {
@ -1171,7 +1179,9 @@ struct box_top
*/ */
template <class Box> template <class Box>
struct boxes_overlap struct boxes_overlap
#if __cplusplus < 201703L
: public std::binary_function<Box, Box, bool> : public std::binary_function<Box, Box, bool>
#endif
{ {
bool operator() (const Box &b1, const Box &b2) const bool operator() (const Box &b1, const Box &b2) const
{ {
@ -1184,7 +1194,9 @@ struct boxes_overlap
*/ */
template <class Box> template <class Box>
struct boxes_touch struct boxes_touch
#if __cplusplus < 201703L
: public std::binary_function<Box, Box, bool> : public std::binary_function<Box, Box, bool>
#endif
{ {
bool operator() (const Box &b1, const Box &b2) const bool operator() (const Box &b1, const Box &b2) const
{ {

View File

@ -44,7 +44,9 @@ namespace db
*/ */
template <class BoxConvert, class Obj, class Prop, class SideOp> template <class BoxConvert, class Obj, class Prop, class SideOp>
struct bs_side_compare_func struct bs_side_compare_func
: std::binary_function<std::pair<const Obj *, Prop>, std::pair<const Obj *, Prop>, bool> #if __cplusplus < 201703L
: std::binary_function<std::pair<const Obj *, Prop>, std::pair<const Obj *, Prop>, bool>
#endif
{ {
typedef typename BoxConvert::box_type box_type; typedef typename BoxConvert::box_type box_type;
@ -69,7 +71,9 @@ private:
*/ */
template <class BoxConvert, class Obj, class Prop, class SideOp> template <class BoxConvert, class Obj, class Prop, class SideOp>
struct bs_side_compare_vs_const_func struct bs_side_compare_vs_const_func
: std::unary_function<std::pair<const Obj *, Prop>, bool> #if __cplusplus < 201703L
: std::unary_function<std::pair<const Obj *, Prop>, bool>
#endif
{ {
typedef typename BoxConvert::box_type box_type; typedef typename BoxConvert::box_type box_type;
typedef typename box_type::coord_type coord_type; typedef typename box_type::coord_type coord_type;

View File

@ -327,6 +327,17 @@ local_processor_cell_context<TS, TI, TR>::local_processor_cell_context (const lo
// .. nothing yet .. // .. nothing yet ..
} }
template <class TS, class TI, class TR>
local_processor_cell_context<TS, TI, TR> &
local_processor_cell_context<TS, TI, TR>::operator= (const local_processor_cell_context &other)
{
if (this != &other) {
m_propagated = other.m_propagated;
m_drops = other.m_drops;
}
return *this;
}
template <class TS, class TI, class TR> template <class TS, class TI, class TR>
void void
local_processor_cell_context<TS, TI, TR>::add (db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *parent, const db::ICplxTrans &cell_inst) local_processor_cell_context<TS, TI, TR>::add (db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *parent, const db::ICplxTrans &cell_inst)

View File

@ -164,6 +164,7 @@ public:
local_processor_cell_context (); local_processor_cell_context ();
local_processor_cell_context (const local_processor_cell_context &other); local_processor_cell_context (const local_processor_cell_context &other);
local_processor_cell_context &operator= (const local_processor_cell_context &other);
void add (db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *parent, const db::ICplxTrans &cell_inst); void add (db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *parent, const db::ICplxTrans &cell_inst);
void propagate (unsigned int layer, const std::unordered_set<TR> &res); void propagate (unsigned int layer, const std::unordered_set<TR> &res);
@ -517,7 +518,6 @@ private:
void issue_compute_contexts (db::local_processor_contexts<TS, TI, TR> &contexts, db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *subject_parent, db::Cell *subject_cell, const db::ICplxTrans &subject_cell_inst, const db::Cell *intruder_cell, typename local_processor_cell_contexts<TS, TI, TR>::context_key_type &intruders, db::Coord dist) const; void issue_compute_contexts (db::local_processor_contexts<TS, TI, TR> &contexts, db::local_processor_cell_context<TS, TI, TR> *parent_context, db::Cell *subject_parent, db::Cell *subject_cell, const db::ICplxTrans &subject_cell_inst, const db::Cell *intruder_cell, typename local_processor_cell_contexts<TS, TI, TR>::context_key_type &intruders, db::Coord dist) const;
void push_results (db::Cell *cell, unsigned int output_layer, const std::unordered_set<TR> &result) const; void push_results (db::Cell *cell, unsigned int output_layer, const std::unordered_set<TR> &result) const;
void compute_local_cell (const db::local_processor_contexts<TS, TI, TR> &contexts, db::Cell *subject_cell, const db::Cell *intruder_cell, const local_operation<TS, TI, TR> *op, const typename local_processor_cell_contexts<TS, TI, TR>::context_key_type &intruders, std::vector<std::unordered_set<TR> > &result) const; void compute_local_cell (const db::local_processor_contexts<TS, TI, TR> &contexts, db::Cell *subject_cell, const db::Cell *intruder_cell, const local_operation<TS, TI, TR> *op, const typename local_processor_cell_contexts<TS, TI, TR>::context_key_type &intruders, std::vector<std::unordered_set<TR> > &result) const;
std::pair<bool, db::CellInstArray> effective_instance (unsigned int subject_layer, db::cell_index_type subject_cell_index, unsigned int intruder_layer, db::cell_index_type intruder_cell_index, const db::ICplxTrans &ti2s, db::Coord dist) const;
bool subject_cell_is_breakout (db::cell_index_type ci) const bool subject_cell_is_breakout (db::cell_index_type ci) const
{ {

View File

@ -121,8 +121,13 @@ msvc {
QMAKE_CXXFLAGS += \ QMAKE_CXXFLAGS += \
/bigobj \ /bigobj \
/wd4251 \ # Disable "DLL interface required" /wd4251 # Disable "DLL interface required"
/source-charset:utf-8 \ # Use UTF-8 for source files
lessThan(QT_MAJOR_VERSION, 6) {
# MSVC 2017 needs this option:
QMAKE_CXXFLAGS += \
/source-charset:utf-8 \ # Use UTF-8 for source files
}
QMAKE_LFLAGS += \ QMAKE_LFLAGS += \
/OPT:NOREF \ # preserves functions we want to keep for implementing the "force link" mechanism /OPT:NOREF \ # preserves functions we want to keep for implementing the "force link" mechanism