msinilo / rdestl Goto Github PK
View Code? Open in Web Editor NEWRDESTL is library providing small subset of STL functionality, aimed at games development.
License: MIT License
RDESTL is library providing small subset of STL functionality, aimed at games development.
License: MIT License
This code crashes with a random access in r156
rde::vector<int> foo;
foo.push_back(70);
foo.push_back(60);
foo.push_back(50);
foo.push_back(40);
rde::quick_sort(foo.begin(), foo.end());
In the internals of the quick sort, one index wraps round the back and ends
up still passing the loop condition.
size_t j = 0;
size_t i = 1;
--j;
do
while(i <= j);
Can easily fix by making low,high,i,j all signed.
Cheers
Dan
Original issue reported on code.google.com by [email protected]
on 25 Nov 2009 at 11:52
Trying to use rdestl's hash_map or hash_map2 on XCode (gcc 4.0)
Error about missing default template argument:
"expected type-specifier"
here:
class THashFunc = rde::hash<TKey>
As far as I can see, rde::hash is not defined anywhere.
svn revision 70
Original issue reported on code.google.com by nearaz
on 30 Jul 2008 at 4:36
What steps will reproduce the problem?
1. Try "svn checkout http://rdestl.googlecode.com/svn/trunk/ rdestl-read-only"
as recommended on the checkout page.
2. It will fail with "svn: URL 'http://rdestl.googlecode.com/svn/trunk' doesn't
exist"
What is the expected output? What do you see instead?
It should checkout the source code, but the http path is wrong and svn does not
find the repository.
What version of the product are you using? On what operating system?
"svn, version 1.6.9" on Windows 7.
Please provide any additional information below.
Using "svn checkout http://rdestl.googlecode.com/svn/ rdestl-read-only" does
work.
Original issue reported on code.google.com by [email protected]
on 20 Jul 2010 at 9:53
The presence of the two defined ctors prevents aggregate initialization of array values at the time of construction. Is this decision intentional, or are you open to removing these? Removing the two constructors defined here would be a breaking change, but warranted IMHO as it complicates porting existing codebases from std to rde.
Lines 19 to 25 in f416f64
Make erase use move rather than copy so as to avoid issues with overlapping
data segments (that copy makes no effort to check for)
Original issue reported on code.google.com by [email protected]
on 4 Jun 2012 at 5:56
Attachments:
Hi there.
I recently tried building rdestl on a variety of compilers. GCC worked fine,
but I had to make some changes to get it compiling with some of the other
compilers.
Here are my notes, often very minor. After making these changes I was able to
compile rdestl on all 4 of the compilers tested (GCC, SNC, GHS Multi and ARMCC).
Thanks,
Mike Kasprzak
**********************************
** SNC **
utility.h - #include <new.h> should be #include <new>
rde_string.h - missing 'typename':
for (basic_string<E, TAllocator, TStorage>::size_type p = 0; p < x.length();
++p)
This should actually be:
for (typename basic_string<E, TAllocator, TStorage>::size_type p = 0; p <
x.length(); ++p)
** GHS Multi **
Worked after SNC fixes.
** ARMCC **
if using <cstring> to get size_t or use memcpy, then you must include std:: in
front.
i.e. std::size_t and std::memcpy.
rdestl_common.h
intrusive_list.h
intrusive_slist.h
slist.h
list.h
Alternatively, use <string.h>.
basic_string.h - Does not like 'non-static function' call in initializer
assignment (sadly).
"src/External/rdeSTL/rde/basic_string.h", line 95: Error: #245: a nonstatic
member reference must be relative to a specific object
basic_string substr(size_type begin, size_type end = length()) const
^
An ugly solution would be to comment out the assignment /*= length()*/ and
create a 2nd function replacing end with length().
basic_string substr(size_type begin) const
{
RDE_ASSERT(end >= begin && begin >= 0);
return basic_string(c_str() + begin, length() - begin);
}
I took the liberty of removing the "&& length() <= length" part from the
RDE_ASSERT line.
Original issue reported on code.google.com by mikekasprzak
on 30 Jul 2013 at 6:31
Hi, I cannot find the authors contact details anywhere, so I am posting this
here and hopefully you
will see it.
I have fixed several bugs in hash_map, vector and string and have created a
basic implementation
of rde::stringstream. Additionally, I have implemented rde::string::find and
rde::string::rfind, also I
have unit tests for these improvements and regression tests for the bugs i
found.
I am happy to submit these back to the trunk project, please get in touch:
silvermace at gmail dot com
Kind Regards,
-Danu
Original issue reported on code.google.com by [email protected]
on 8 May 2010 at 3:36
Causing all tests using Set<T>::iterator
, as well as RBTreeTest "IterationFromSmallest" to fail.
Lines 38 to 46 in 5789cef
What steps will reproduce the problem?
Try to rebuild the simple test code (see below):
///////////////////////////////////main.cpp
#include <stdafx.h>
#include <rdestl/hash_map.h>
int main(int argc, char** argv)
{
rde::hash_map<const char *, int, rde::hash<const char *>, 6> hashmap;
hashmap["abc"] = 1;
hashmap["def"] = 2;
rde::hash_map<const char *, int, rde::hash<const char *>, 6>::iterator it
= hashmap.find("abc");
if(it != hashmap.end())
std::cout << it->second;
return 0;
}
///////////////stdafx.h
#ifndef _STDAFX_H_
#define _STDAFX_H_
#pragma once
#include <iostream>
#endif
What is the expected output? What do you see
Compilation without errors is expected instead I get an errors:
Error 1 error LNK2019: unresolved external symbol "public: void __thiscall
rde::allocator::deallocate(void *,unsigned int)"
(?deallocate@allocator@rde@@QAEXPAXI@Z) referenced in function "private:
void __thiscall rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class
rde::allocator>::delete_nodes(void)"
(?delete_nodes@?$hash_map@PBDHU?$hash@PBD@rde@@$05U?$equal_to@PBD@2@Vallocator@2
@@rde@@AAEXXZ)
main.obj rdestltest
Error 2 error LNK2019: unresolved external symbol "public: void *
__thiscall rde::allocator::allocate(unsigned int,int)"
(?allocate@allocator@rde@@QAEPAXIH@Z) referenced in function "private:
struct rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class rde::allocator>::node *
__thiscall rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class
rde::allocator>::allocate_nodes(int)"
(?allocate_nodes@?$hash_map@PBDHU?$hash@PBD@rde@@$05U?$equal_to@PBD@2@Vallocator
@2@@rde@@AAEPAUnode@12@H@Z)
main.obj rdestltest
Error 3 fatal error LNK1120: 2 unresolved externals
C:\Projects\RoughSetLib\Debug\rdestltest.exe rdestltest
What version of the product are you using? On what operating system?
Windows 7 Enterprise 64 bit
Microsoft Visual Studio Team System 2008 (development Edition) with SP1
installed
Please provide any additional information below.
I guess that it might be related to linker setup?
What is needed to compile this on MSVS 2008SP1 ?
Original issue reported on code.google.com by [email protected]
on 8 Mar 2010 at 9:57
Assigning an empty vector to a non-empty vector does nothing.
The assignment operator directly calls copy(...) which does nothing if rhs is
empty.
Original issue reported on code.google.com by [email protected]
on 11 Aug 2010 at 3:16
Fixed checks for overlapping memory sections in move commands.
Original issue reported on code.google.com by [email protected]
on 4 Jun 2012 at 5:54
Attachments:
What steps will reproduce the problem?
1. Instantiate an rde::vector with an unsigned type (e.g. unsigned int)
2. push_back() your favorite integer
3. Step into rde::copy_construct and note that the int_to_type<false>
specialization is being called.
What is the expected output? What do you see instead?
I would expect the int_to_type<true> version to be called for an unsigned
integer type
What version of the product are you using? On what operating system?
r210
Please provide any additional information below.
When I locally added unsigned int to the RDE_INTEGRAL definition, the
int_to_type<true> variant of rde::copy_construct got called, as expected.
Is there a reason that I should be aware of, that unsigned types were not
included in this macro? If so, it would be good to document the reason.
Thank you very much.
Original issue reported on code.google.com by [email protected]
on 27 Mar 2012 at 3:59
Are you open to adopting the standard (u)intN_t
typedefs from <stdint.h>? That appears to be the original intention based on your inline comment, but I'm guessing that was in 2008 lol. I do know vc100 and later ships with stdint. I can do a pull request for this if you want to go that route, just let me know.
Lines 34 to 44 in ffb0bca
Should this be marked as explicit
to prevent implicit upcasting to integer by the compiler?
Line 41 in ffb0bca
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.