tr1 Questions

6

Solved

Different compilers seem to have different ideas about TR1. G++ only seems to accept includes of the type: #include <tr1/unordered_map> #include <tr1/memory> ... While Microsofts com...
Decrial asked 4/8, 2009 at 16:5

5

Solved

I'm using MS VC 2008 and for some projects Intel C++ compiler 11.0. Is it worth using tr1 features in production? Will they stay in new standard? For example, now I use stdext::hash_map. TR1 defin...
Longlongan asked 8/3, 2010 at 12:30

1

Solved

I have written a class using std::tr1::regex, and I don't know how to link it. I get (sorry for the large dump...) : $ g++ DictReader.cpp -std=c++0x /usr/include/c++/4.4/tr1_impl/regex:2255: warn...
Asafoetida asked 8/3, 2010 at 2:43

1

Solved

I have a question related to understanding of how python dictionaries work. I remember reading somewhere strings in python are immutable to allow hashing, and it is the same reason why one cannot...
Behka asked 28/2, 2010 at 19:35

4

Solved

I couldn't find anything regarding this on http://msdn.microsoft.com/en-us/library/bb982727.aspx. Maybe I could use '[^]+' to match everything but that seems like a hack?
Transit asked 12/1, 2010 at 21:24

3

Solved

I'm writing some stuff using the tr1 namespace in VS2008. What will happen when C++xx becomes ratified? Has this happened before with other C++ revisions? Will the tr1 stuff still work or will I ha...
Deadman asked 4/1, 2010 at 22:31

4

Solved

I was wandering how it's possible to reverese strings that are contained in a vector using a single for_each command just in one "simple" line. Yea, I know it is easy with a custom functor, but I ...
Calabresi asked 30/9, 2009 at 9:38

2

Solved

I'm trying to typedef either an unordered_map or std::map depending whether there are TR1 libraries available. But I don't want to specify the template parameters. From what i've read so far, typed...
Cusco asked 24/9, 2009 at 22:5

7

Solved

I'm in the process of implementing a binary tree in C++. Traditionally, I'd have a pointer to left and a pointer to right, but manual memory management typically ends in tears. Which leads me to my...
Astri asked 17/12, 2008 at 22:47

1

Solved

Are there any differences between boost::shared_ptr, std::tr1::shared_ptr and the upcoming (in C++0x) std::shared_ptr? Will porting from one to another have any overhead or are they basically the ...
Sister asked 6/7, 2009 at 12:53

2

Solved

recently I've been reading through Scott Meyers's excellent Effective C++ book. In one of the last tips he covered some of the features from TR1 - I knew many of them via Boost. However, there wa...
Lepage asked 11/10, 2008 at 5:36

3

Solved

How to do intersection and union for sets of the type tr1::unordered_set in c++? I can't find much reference about it. Any reference and code will be highly appreciated. Thank you very much. Upda...
Actinology asked 22/5, 2009 at 2:31

3

Solved

I am working on a platform with a gcc compiler however boost cannot compile on it. I am wondering what is the proper way to include the shared_ptr in std:tr1 on gcc? the file i looked in said not ...
Heyde asked 23/1, 2009 at 0:33

4

I need to map a pair of long long to a double, but I'm not sure what hash function to use. Each pair may consist of any two numbers, although in practice they will usually be numbers between 0 and ...
Boycott asked 10/4, 2009 at 15:47

2

Solved

I've had a hard time finding references in the TR1 documentation concerning shared arrays. The Boost documentation is fairly clear that there is a significant difference between the C++ "new" and "...
Composed asked 9/3, 2009 at 19:22

2

Solved

I have class with a member function that takes a default argument. struct Class { void member(int n = 0) {} }; By means of std::tr1::mem_fn I can invoke it: Class object; std::tr1::mem_fn(&a...
Muscid asked 16/11, 2008 at 19:25

5

Solved

Now that shared_ptr is in tr1, what do you think should happen to the use of std::auto_ptr? They both have different use cases, but all use cases of auto_ptr can be solved with shared_ptr, too. Wil...
Rebbeccarebe asked 13/10, 2008 at 8:56

7

Solved

I need an associative container that makes me index a certain object through a string, but that also keeps the order of insertion, so I can look for a specific object by its name or just iterate on...
Classics asked 30/8, 2008 at 13:20

© 2022 - 2024 — McMap. All rights reserved.