Jump to content

  • Log In with Google      Sign In   
  • Create Account

rozz666

Member Since 27 May 2007
Offline Last Active Today, 08:00 AM

Posts I've Made

In Topic: std::map iterator increment issue

17 November 2014 - 01:12 PM


That means that pointers are not guaranteed to satisfy the "strict weak ordering" requirement for keys in a map, which in turn probably results in undefined behavior.

 

While this is true for operator<, std::less for pointer guarantees correct ordering (source: http://en.cppreference.com/w/cpp/utility/functional/less).


In Topic: Using old array or stl

19 August 2014 - 01:52 PM

Yes, I agree with fastcall22.


In Topic: Reference initialization required.

15 April 2014 - 01:05 PM

 

In Python, references are mutable and their labels (referers)are changed to refer to other referents(objects) by using an = operation.

a=20
b=a
b=30 # Changing object refering-to (referent 30)
del a # Who cares?! b is referring to another object now. Object 20 is garbage collected.  
print b

Output:

30

 

Python reference are C++ pointers (they are also garbage collected, of course).


In Topic: "Vector" of types? (compile time template)

23 March 2014 - 03:00 PM

Have a look at Boost.MPL: http://www.boost.org/doc/libs/1_55_0/libs/mpl/doc/refmanual.html

It provides among other things containers and algorithms for types.


In Topic: Always running into a circular dependency

29 November 2013 - 10:35 AM

Why does an Entity has to know about the Scene?


PARTNERS