Skip to content

Commit

Permalink
C++17 stuff. NB regression suite is not passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
highperformancecoder committed Nov 28, 2023
1 parent 41bc362 commit ce49871
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graphcode
Submodule graphcode updated 1 files
+10 −0 graphcode.h
11 changes: 11 additions & 0 deletions include/TCL_obj_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ namespace ecolab
#pragma omit TCL_obj ecolab::TCL_args
#endif

#if defined(__GNUC__) && !defined(__ICC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif

/// RAII TCL_Obj ref
class TCLObjRef
{
Expand All @@ -102,13 +107,19 @@ namespace ecolab
~TCLObjRef() {Tcl_DecrRefCount(ref);}
TCLObjRef(const TCLObjRef& x): ref(x.ref) {Tcl_IncrRefCount(ref);}
TCLObjRef& operator=(const TCLObjRef& x) {
Tcl_DecrRefCount(ref);
ref=x.ref;
Tcl_IncrRefCount(ref);
return *this;
}
Tcl_Obj* get() const {return ref;}
};

#if defined(__GNUC__) && !defined(__ICC)
#pragma GCC diagnostic pop
#endif


/// count class that exposes const public attribute
class TCL_args_count
{
Expand Down
4 changes: 4 additions & 0 deletions models/Stupid_Project/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ include $(ECOLAB_HOME)/include/Makefile

MODELS=stupid01 stupid02 stupid03 stupid04 stupid05 stupid06 stupid09 stupid10 stupid11 stupid12 stupid14 stupid15 stupid16

# graphcode uses std::iterator, which is deprecated
# I don't know why the compiler is flagging Cell as uninitialised
CXXFLAGS+=-Wno-deprecated-declarations -Wno-maybe-uninitialized

ifdef TK
MODELS+=stupid-field
endif
Expand Down
1 change: 1 addition & 0 deletions models/ecolab_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ using classdesc::Object;
class ecolab_point: public Object<ecolab_point,GRAPHCODE_NS::object>
{
protected:
using Object<ecolab_point,GRAPHCODE_NS::object>::pack;
// override object::pack
template <class A, class M>
A pack(const A& e, const M& mask, long ntrue=-1)
Expand Down

0 comments on commit ce49871

Please sign in to comment.