slist (a718d426) | slist (ae5c9b6c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 43 unchanged lines hidden (view full) --- 52 #define STLP4_SLIST_EMUBASE std::list 53#endif 54 55namespace std 56{ 57using STLP4_SLIST_EMUBASE; 58 59// lame emulation of the pre-C++11 slist using the std::forward_list (or std::list) | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 43 unchanged lines hidden (view full) --- 52 #define STLP4_SLIST_EMUBASE std::list 53#endif 54 55namespace std 56{ 57using STLP4_SLIST_EMUBASE; 58 59// lame emulation of the pre-C++11 slist using the std::forward_list (or std::list) |
60template< typename T, class A=allocator<T> > 61class slist : public STLP4_SLIST_EMUBASE<T,A> | 60template< typename T > 61class slist : public STLP4_SLIST_EMUBASE<T> |
62{ 63public: | 62{ 63public: |
64 typedef typename STLP4_SLIST_EMUBASE<T,A> _super; | 64 typedef typename STLP4_SLIST_EMUBASE<T> _super; |
65 typedef typename _super::iterator slist_mit; 66 typedef typename _super::const_iterator slist_cit; 67 68private: // prevent the use of methods not available in forward_list 69 // signatures are intentionally mismatched to catch invocations 70 size_t size() const; 71 void insert( void) const; 72}; 73 74} 75 76#endif // NO_STLPORT4_EMULATION 77 78#endif 79 | 65 typedef typename _super::iterator slist_mit; 66 typedef typename _super::const_iterator slist_cit; 67 68private: // prevent the use of methods not available in forward_list 69 // signatures are intentionally mismatched to catch invocations 70 size_t size() const; 71 void insert( void) const; 72}; 73 74} 75 76#endif // NO_STLPORT4_EMULATION 77 78#endif 79 |