Git Product home page Git Product logo

rdestl's People

Contributors

colingilbert avatar msinilo avatar ste1io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdestl's Issues

quick sort broken

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

rde::hash is missing

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

Wrong checkout command line

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

`fixed_array` ctor prevents aggregate initialization

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.

rdestl/fixed_array.h

Lines 19 to 25 in f416f64

fixed_array() { /**/ }
fixed_array(const T array[N])
{
rde::copy_n(&array[0], N, m_data);
}
// copy ctor/dtor generated
// assignment op generated

Patch for /vector.h

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:

Errors on other compilers (with fixes)

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

fixed bugs, want to submit.

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

unresolved external symbol

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

RDE_INTEGRAL definition missing unsigned types

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

stdint.h and portability

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.

rdestl/rdestl_common.h

Lines 34 to 44 in ffb0bca

// # Meh. MSVC doesnt seem to have <stdint.h>
// @todo Fixes to make this portable.
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef signed long int32;
typedef unsigned long uint32;
#ifdef _MSC_VER
typedef unsigned __int64 uint64;
#else
typedef unsigned long long uint64;
#endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.