Changeset 17293 for trunk


Ignore:
Timestamp:
10/21/13 13:39:34 (11 years ago)
Author:
tbretz
Message:
Found a better solution to allow rootcint to parse unordered_map.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/fits.h

    r17274 r17293  
    1111#include <stdexcept>
    1212
    13 #ifdef __CINT__
     13#ifndef __CINT__
     14#include <unordered_map>
     15#else
    1416#define off_t size_t
    15 #endif
    16 
    17 #if !defined(__MARS__) && !defined(__CINT__)
    18 #include <unordered_map>
     17namespace std
     18{
     19    template<class T, class S> class unordered_map<T, S>;
     20}
    1921#endif
    2022
     
    489491    Addresses fAddresses;
    490492
    491 #if defined(__MARS__) || defined(__CINT__)
    492     typedef std::map<std::string, void*> Pointers;
    493 #else
    494493    typedef std::unordered_map<std::string, void*> Pointers;
    495 #endif
    496494    Pointers fPointers;
    497495
     
    817815    }
    818816
    819 #if !defined(__MARS__) && !defined(__CINT__)
    820817    virtual bool GetRow(size_t row, bool check=true)
    821 #else
    822     virtual bool GetRowNum(size_t row, bool check=true)
    823 #endif
    824818    {
    825819        if (check && row>=fTable.num_rows)
     
    847841    bool GetNextRow(bool check=true)
    848842    {
    849 #if !defined(__MARS__) && !defined(__CINT__)
    850843        return GetRow(fRow+1, check);
    851 #else
    852         return GetRowNum(fRow+1, check);
    853 #endif
    854844    }
    855845
Note: See TracChangeset for help on using the changeset viewer.