3 Replies Latest reply: Jun 12, 2014 10:17 AM by Steve.Clamage-Oracle RSS

    12.4 beta. Cannot use boolean vector as a template parameter


      I can't seem to use a boolean vector inside another container class when compiling for C++11. This creates an assertion error:

      >> Assertion:   (../lnk/tparam.cc, line 425)

      Standard vectors do not cause any error.


      The code below compiles cleanly without the "-std=c++11" flag, but reproduces the error with "-std=c++11"

      #include <utility>

      #include <vector>

      #include <map>

      #include <set>

      #include <list>


      using std::pair;

      using std::map;

      using std::vector;

      using std::set;

      using std::list;


      int main (int argc, char **argv)


         //These are OK


         pair<int, vector<int> > goodpair;

         map<int, vector<int> > goodmap;

         vector<vector<int> > goodvector;

         set<vector<int> > goodset;


         // Each of these creates an assertion failure

         // >> Assertion:   (../lnk/tparam.cc, line 425)

         // when compiled with -std=c++11


         pair<int, vector<bool> > badpair;

         map<int, vector<bool> > badmap;

         vector<vector<bool> > badvector;

         set<vector<bool> > badset;


         //This is OK

         list<vector<bool> > goodlist;


         return 0;