This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bypassing g++-STL purify UMR wanings.



I have a quick and dirty bypass that solves
some (all?) undeired UMR's form g++'s STL.
This is by adding 2 lines to:
  <g++-root>/include/g++/type_traits.h

Change:
------------------------------------------------------------------------
struct __true_type {
};

struct __false_type {
};
-----------------------------------------------------------------------
into:
-----------------------------------------------------------------------
struct __true_type {
 __true_type() : bdum(true) {}
 private: bool bdum;
};

struct __false_type {
 __false_type() : bdum(false) {}
 private: bool bdum;
};
-----------------------------------------------------------------------

I tried it with g++2.8.1 that I just installed and my tiny program:
      #include <vector>
      int main(int, char**)
      {
	 vector<float>  vf;
	 vf.push_back(3.14);
	 return(0);
      }
now without UMR's!


Now we should decide, if we want to patch or installed headers
with this kludge

-- yotam



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]