mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
parser-inc: add missing template args to std containers
This commit is contained in:
parent
97e6a314b1
commit
43961718fa
@ -24,19 +24,23 @@
|
|||||||
#include <stdcompare.h>
|
#include <stdcompare.h>
|
||||||
#include <pair>
|
#include <pair>
|
||||||
|
|
||||||
template<class key, class element, class compare = less<key> >
|
namespace std {
|
||||||
|
template<class T> class allocator;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Key, class Element, class Compare = less<Key>, class Allocator = std::allocator<pair<const Key, T> > >
|
||||||
class map {
|
class map {
|
||||||
public:
|
public:
|
||||||
typedef key key_type;
|
typedef Key key_type;
|
||||||
typedef element data_type;
|
typedef Element data_type;
|
||||||
typedef element mapped_type;
|
typedef Element mapped_type;
|
||||||
typedef pair<const key, element> value_type;
|
typedef pair<const Key, Element> value_type;
|
||||||
typedef compare key_compare;
|
typedef Compare key_compare;
|
||||||
|
|
||||||
typedef element *pointer;
|
typedef Element *pointer;
|
||||||
typedef const element *const_pointer;
|
typedef const Element *const_pointer;
|
||||||
typedef element &reference;
|
typedef Element &reference;
|
||||||
typedef const element &const_reference;
|
typedef const Element &const_reference;
|
||||||
|
|
||||||
class iterator;
|
class iterator;
|
||||||
class const_iterator;
|
class const_iterator;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <iosfwd>
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template<class CharT, class Traits>
|
template<class CharT, class Traits>
|
||||||
std::basic_ostream<CharT, Traits> &ends(std::basic_ostream<CharT, Traits> &os);
|
std::basic_ostream<CharT, Traits> &ends(std::basic_ostream<CharT, Traits> &os);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
template<class charT> struct char_traits;
|
template<class charT> struct char_traits;
|
||||||
|
template<class T> class allocator;
|
||||||
|
|
||||||
template<> struct char_traits<char> {
|
template<> struct char_traits<char> {
|
||||||
using char_type = char;
|
using char_type = char;
|
||||||
@ -51,7 +52,7 @@ namespace std {
|
|||||||
using state_type = mbstate_t;
|
using state_type = mbstate_t;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class ctype>
|
template<class CharT, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT> >
|
||||||
class basic_string {
|
class basic_string {
|
||||||
public:
|
public:
|
||||||
struct iterator;
|
struct iterator;
|
||||||
@ -63,17 +64,17 @@ namespace std {
|
|||||||
static const size_t npos = -1;
|
static const size_t npos = -1;
|
||||||
|
|
||||||
basic_string();
|
basic_string();
|
||||||
basic_string(const basic_string<ctype> ©);
|
basic_string(const basic_string<CharT> ©);
|
||||||
void operator = (const basic_string<ctype> ©);
|
void operator = (const basic_string<CharT> ©);
|
||||||
basic_string(const ctype *string);
|
basic_string(const CharT *string);
|
||||||
~basic_string();
|
~basic_string();
|
||||||
|
|
||||||
const ctype *c_str() const;
|
const CharT *c_str() const;
|
||||||
size_t length() const;
|
size_t length() const;
|
||||||
|
|
||||||
ctype at(size_t pos) const;
|
CharT at(size_t pos) const;
|
||||||
ctype operator[](size_t pos) const;
|
CharT operator[](size_t pos) const;
|
||||||
ctype &operator[](size_t pos);
|
CharT &operator[](size_t pos);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef basic_string<char> string;
|
typedef basic_string<char> string;
|
||||||
|
@ -22,17 +22,21 @@
|
|||||||
|
|
||||||
#include <stdtypedefs.h>
|
#include <stdtypedefs.h>
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template<class T> class allocator;
|
||||||
|
}
|
||||||
|
|
||||||
inline namespace std {
|
inline namespace std {
|
||||||
|
|
||||||
template<class element>
|
template<class T, class Allocator = std::allocator<T> >
|
||||||
class vector {
|
class vector {
|
||||||
public:
|
public:
|
||||||
typedef element value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
typedef element *pointer;
|
typedef T *pointer;
|
||||||
typedef const element *const_pointer;
|
typedef const T *const_pointer;
|
||||||
typedef element &reference;
|
typedef T &reference;
|
||||||
typedef const element &const_reference;
|
typedef const T &const_reference;
|
||||||
|
|
||||||
typedef pointer iterator;
|
typedef pointer iterator;
|
||||||
typedef const_pointer const_iterator;
|
typedef const_pointer const_iterator;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user