why cpp is a shitty language
// the below is a standard template for any of my writings about c++
cpp_is_a_shitty_language_as {
this morning, sinsce the shitty project i'm working on has shitty code that redefines false and true, when i used hash_set, I got the below shit
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility() : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<std::_List_const_iterator<_Mylist>&,_Ty>(_Other1,_Other2 &&)' being compiled
> with
> [
> _Ty1=std::_List_const_iterator<std::_List_val<MyEdge,std::allocator<MyEdge>>>,
> _Ty2=bool,
> _Mylist=std::_List_val<MyEdge,std::allocator<MyEdge>>,
> _Ty=int,
> _Other1=std::_List_const_iterator<std::_List_val<MyEdge,std::allocator<MyEdge>>> &,
> _Other2=int
> ]
It was a warning, but since we enforce a build policy that treats all warnings as errors (not shitty at all by itself) that shittily is unable to detect the shitty redifinition but stops my stl depending code from compiling, I had to spend almost two hours figuring out the cause, which is the shitty redefinition. And after I added this before the stl inclusion the warnings and errors disappeared.
#ifdef false
# undef false
#endif
#ifdef true
# undef true
#endif
} so_cpp_is_a_shitty_language
why cpp is a shitty language的更多相关文章
- 1.2 ASSEMBLY LANGUAGE
People are much happier moving up the ladder,socially or even technically.So our profession has move ...
- ios工程中加入.c/.cpp文件
如果你在工程里拉入.c/.cpp文件就会导致工程报错, 现在有两种解决方式 1. 把.c文件的后缀全部改成.m的后缀 把.cpp文件的后缀改成.mm的后缀 2. 使用 工程名-Prefix.pch 并 ...
- A Neural Probabilistic Language Model
A Neural Probabilistic Language Model,这篇论文是Begio等人在2003年发表的,可以说是词表示的鼻祖.在这里给出简要的译文 A Neural Probabili ...
- awesome cpp
https://github.com/fffaraz/awesome-cpp Awesome C/C++ A curated list of awesome C/C++ frameworks, lib ...
- Efficient&Elegant:Java程序员入门Cpp
最近项目急需C++ 的知识结构,虽说我有过快速学习很多新语言的经验,但对于C++ 老特工我还需保持敬畏(内容太多),本文会从一个Java程序员的角度,制定高效学习路线快速入门C++ . Java是为了 ...
- CPP全面总结(涵盖C++11标准)
OOP之类和对象 1. this指针的引入 每个成员函数都有一个额外的隐含的形参,这个参数就是this指针,它指向调用对象的地址.默认情况下,this的类型是指向类类型非常量版本的常量指针.可以表示成 ...
- SerialPort.h SerialPort.cpp
SerialPort.h 1 #ifndef __SERIALPORT_H__ 2 #define __SERIALPORT_H__ 3 4 #define WM_COMM_BREAK_DETECTE ...
- C++ Programming Language中的Calculator源代码
C++ Programming Language 4th中的Calculator源代码整理,因为在C++ Programming Language中,涉及了很多文件位置之类的变化,所以,这里只是其中的 ...
- Deep Learning Libraries by Language
Deep Learning Libraries by Language Tweet Python Theano is a python library for defining and ...
随机推荐
- Cocoapods 更新后 使用
platform:ios,'8.0'target 'APPNAME' do pod 'SMSSDK' pod 'MBProgressHUD', '0.9.1' pod 'AFNetworking', ...
- 查看centos的版本
[root@NB Desktop]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4 ...
- Android ANR分析(1)
转自:http://blog.csdn.net/itachi85/article/details/6918761 一:什么是ANR ANR:Application Not Responding,即应用 ...
- 设计模式学习之备忘录模式(Memento,行为型模式)(19)
假如我们已经记录一个人的个人信息,但是发现信息写错了,然后我先备份下再去修改,结果发现原来的信息是正确的,于是我就看备份的个人信息还原到初始的状态,下面我们用代码去实现 class Program { ...
- SQL数据库约束
针对维护数据库的完整性,关系型数据库SQL提供了数据约束来管理数据,常用的约束有:外键.唯一.主键. 主键约束:标识数据的唯一,便于数据查询索引: 唯一约束:保证数据的唯一性:常用语法 alter t ...
- Memcached缓存在.Net 中的使用(memcacheddotnet)
缓存对于提高大数据量的网站性能无疑不是一个很好的解决方案,针对缓存的使用网上同仁介绍很多,再次我仅仅分享一下自己对Memcached使用的简单介绍.Memchached的使用通过第三方DLL来完成,常 ...
- HDU1899 Sum the K-th's(树状数组)
枚举,每次增加点,删除点 #include<cstdio> #include<iostream> #include<cstdlib> #include<cst ...
- php正则获取网页标题、关键字、网页描述代码
php正则获取网页关键字,代码如下: function get_keywords($html) { $html=strtolower($html); preg_match("@<hea ...
- JQuery EasyUI validatebox(验证框)
JQuery EasyUI validatebox(验证框) http://www.easyui.info/archives/602.html
- 思想&观点&人生
思想: 思想的直接表现往往是对事物的观点,观点越多并且越接近本质,表示思想越丰富和深刻 观点不是事实 观点是基于事实之上的一种系统性的判断和理解框架,事实是观点的基础 观点不一定正确 观点组成: 事实 ...