User forums > Nightly builds
The 19 september 2010 build (6608) CODECOMPLETION BRANCH version is out.
ollydbg:
--- Quote from: Borr on September 24, 2010, 09:00:21 am ---ibpp(http://www.ibpp.org/) and CC problem still not solved
http://forums.codeblocks.org/index.php/topic,11844.msg80492.html#msg80492
--- End quote ---
Operator overload for "->" is added at least for some std containers.
Loaden:
--- Quote from: oBFusCATed on September 24, 2010, 10:31:04 am ---As far as I know nullptr is defined somewhere in CB's sources, so it could be used.
p.s. nullptr will be in gcc 4.6 :)
--- End quote ---
Rewritten nullptr.
docs: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/nullptr
Loaden:
Rewritten nullptr again.
--- Code: ---#if ( __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) ) \
&& !defined __GXX_EXPERIMENTAL_CXX0X__
const class nullptr_t
{
public:
template<typename T> operator T* () const { return (T*)0; }
template<typename C, typename T> operator T C::* () const { return (T C::*)0; }
template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
private:
void operator&() const;
} nullptr = {};
template<typename T> inline bool operator==(const nullptr_t& lhs, T const& rhs) { return lhs.equals(rhs); }
template<typename T> inline bool operator==(T const& lhs, const nullptr_t& rhs) { return rhs.equals(lhs); }
template<typename T> inline bool operator!=(const nullptr_t& lhs, T const& rhs) { return !lhs.equals(rhs); }
template<typename T> inline bool operator!=(T const& lhs, const nullptr_t& rhs) { return !rhs.equals(lhs); }
#endif
class A {};
int main()
{
int* p = nullptr;
if (p == nullptr || p != nullptr)
;
if (nullptr == p || nullptr != p)
;
A* a = nullptr;
if (a == nullptr || a != nullptr)
;
if (nullptr == a || nullptr != a)
;
return 0;
}
--- End code ---
:lol:
[attachment deleted by admin]
oBFusCATed:
Loaden you can't implement nullptr using c++98 or c++03, if should be added to the language!
Loaden:
--- Quote from: oBFusCATed on September 24, 2010, 04:23:43 pm ---Loaden you can't implement nullptr using c++98 or c++03, if should be added to the language!
--- End quote ---
I know, However, Before added to the language, we can first use it to replace, in order to C++0x.
:)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version