小编chy*_*hys的帖子

六个点在可变参数模板中意味着什么?

以下是来自libstdc ++的一些部分特化:std::is_function<type_traits>

  /// is_function
  template<typename>
    struct is_function
    : public false_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes...)>
    : public true_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes...) &>
    : public true_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes...) &&>
    : public true_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes......)>
    : public true_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes......) &>
    : public true_type { };

  template<typename _Res, typename... _ArgTypes>
    struct is_function<_Res(_ArgTypes......) …
Run Code Online (Sandbox Code Playgroud)

c++ templates partial-specialization variadic-templates c++11

32
推荐指数
0
解决办法
1781
查看次数

检查是否在vimrc中安装了病原体

我想检查.vimrc病原体是否存在,并且pathogen#infect如果是,则打电话.

这显然有效:

call pathogen#infect()
Run Code Online (Sandbox Code Playgroud)

所以我确信病原体已正确安装.

但这不会加载病原体:

if exists("*pathogen#infect")
    call pathogen#infect()
endif
Run Code Online (Sandbox Code Playgroud)

这也不是:

if exists("g:loaded_pathogen")
    call pathogen#infect()
endif
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

vim

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