小编fni*_*eto的帖子

你在Eclipse CDT中使用了哪些插件?

建议您在日常工作中发现一些有用的插件.

Eclipse CDT存储库:

  • Helios:http://download.eclipse.org/releases/helios
  • C++开发工具:http://download.eclipse.org/tools/cdt/releases/helios

插件:

请添加一个带有eclipse更新URL的插件进行发布.

c++ plugins eclipse-plugin eclipse-cdt

14
推荐指数
1
解决办法
7866
查看次数

const引用绑定到右值

在处理这个问题时,我发现了一种不一致的行为.

为什么引用绑定在构造函数中与常用函数的行为不同?

struct A {
};

struct B : public A {
  B(){}
private:
  B(const B&);
};

void f( const B& b ) {}

int main() {
  A a( B() ); // works
  A const & a2 = B(); // C++0x: works, C++03: fails
  f( B() );  // C++0x: works, C++03: fails
}
Run Code Online (Sandbox Code Playgroud)

我已经使用g ++ - 4.1和Comeau 4.2.45.2在严格的C++ 03模式下测试了C++ 03并且禁用了C++ 0x扩展.我得到了相同的结果.

对于C++ 0x,在宽松模式下使用g ++ - 4.4和Comeau 4.3.9进行了测试,并启用了C++ 0x扩展.我得到了相同的结果.

c++ c++11

9
推荐指数
1
解决办法
4万
查看次数

类型特征定义.特征blob和元功能

阅读一些源代码,我发现了下一个特征定义:

namespace dds {  
   template <typename Topic> struct topic_type_support { };
   template <typename Topic> struct topic_data_writer { };
   template <typename Topic> struct topic_data_reader { };
   template <typename Topic> struct topic_data_seq { };
}

#define REGISTER_TOPIC_TRAITS(TOPIC) \
namespace dds { \
   template<> struct topic_type_support<TOPIC> { \
      typedef TOPIC##TypeSupport type; }; \
   template<> struct topic_data_writer<TOPIC> { \
      typedef TOPIC##DataWriter type; }; \
   template<> struct topic_data_reader<TOPIC> { \
      typedef TOPIC##DataReader type; }; \
   template<> struct topic_data_seq<TOPIC> { \
      typedef TOPIC##Seq type; }; \ …
Run Code Online (Sandbox Code Playgroud)

c++ templates type-traits

7
推荐指数
1
解决办法
1115
查看次数

字符串以^ Bo开头

有人知道^Bo在编码字符串的开头是什么意思吗?字符串的其余部分是有效的ASCII.

示例:"^BoHello"应解释为"Hello"
注意:'^B'是控制字符0x02

c# c++ java string ascii

3
推荐指数
1
解决办法
184
查看次数

标签 统计

c++ ×4

ascii ×1

c# ×1

c++11 ×1

eclipse-cdt ×1

eclipse-plugin ×1

java ×1

plugins ×1

string ×1

templates ×1

type-traits ×1