您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ which函数代码示例

51自学网 2021-06-03 09:55:59
  C++
这篇教程C++ which函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中which函数的典型用法代码示例。如果您正苦于以下问题:C++ which函数的具体用法?C++ which怎么用?C++ which使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了which函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: destroy_value

		variant &operator = (variant const &other)		{			if (which() == other.which())			{				static std::array<void(*)(variant &, variant const &), sizeof...(T)> const assign =				{{					&copy_assign<T>...				}};				assign[which()](*this, other);			}			else			{				destroy_value();				try				{					m_which = other.m_which;					copy_construct_value(other);				}				catch (...)				{					m_which = invalid_which;					throw;				}			}			return *this;		}
开发者ID:TyRoXx,项目名称:how-to-variant,代码行数:26,


示例2: main

int main(void){	if (!is_root()) {		printf("Root privileges needed to get the hard disk info./n");		return EXIT_SUCCESS;	}	char *df = which("df");	char *fdisk = which("fdisk");	char *cmd = NULL;	char *path = NULL;	cmd = calloc(55, sizeof(char));	sprintf(cmd, "%s -l | grep /dev/ | awk '{print $%d}'", fdisk, 2);	path = get_cmd_output(cmd, 12);	path = strip_end(path, ":");	hd = new_device(path);	delete(&cmd);	delete(&path);	cmd = calloc(45, sizeof(char));	sprintf(cmd, "%s -P | awk '{print $%d}' | grep %s", df, 1, hd->name);	path = get_cmd_output(cmd, 13);	part = new_device(path);	delete(&cmd);	delete(&path);	int fails = 0;	Suite *s = hd_suite();	SRunner *sr = srunner_create(s);	srunner_run_all(sr, CK_NORMAL);	fails = srunner_ntests_failed(sr);	srunner_free(sr);	return (fails == 0) ? EXIT_SUCCESS : EXIT_FAILURE;}
开发者ID:adrianomelo,项目名称:ldc,代码行数:35,


示例3: romanToInt

int romanToInt(char* s) {   int rlt = 0;   while (*s) {       int pre = which(*s++);       if (*s && pre < which(*s)) rlt -= pre;       else rlt += pre;   }    return rlt;}
开发者ID:shuyulxf,项目名称:leetcode-srccode,代码行数:9,


示例4: which

// A version that doesn't require having MyStrings passed to it, in// case we find this easier to use...MyStringwhich( const char* strFilename, const char* strAdditionalSearchDir ){	MyString file( strFilename );	if( strAdditionalSearchDir ) {		MyString additionalSearch( strAdditionalSearchDir );		return which( file, additionalSearch );	} 	return which( file );}
开发者ID:AlainRoy,项目名称:htcondor,代码行数:12,


示例5: switch

voidNotifyList::MessageReceived (BMessage *msg){  switch (msg->what)  {    case M_NOTIFYLIST_RESIZE:      {        ClientWindow *cWin (vision_app->pClientWin());        cWin->DispatchMessage (msg, cWin->pCwDock());        break;      }        case M_THEME_FOREGROUND_CHANGE:      {        int16 which (msg->FindInt16 ("which"));        bool refresh (false);        switch (which)        {          case C_NOTIFYLIST_BACKGROUND:            fActiveTheme->ReadLock();            SetViewColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND));            fActiveTheme->ReadUnlock();            refresh = true;            break;                    case C_NOTIFY_ON:          case C_NOTIFY_OFF:          case C_NOTIFYLIST_SELECTION:            refresh = true;            break;        }        if (refresh)          Invalidate();      }      break;    case M_THEME_FONT_CHANGE:      {        int16 which (msg->FindInt16 ("which"));        if (which == F_WINLIST)        {          fActiveTheme->ReadLock();          SetFont (&fActiveTheme->FontAt (F_WINLIST));          fActiveTheme->ReadUnlock();          Invalidate();        }      }      break;          default:      BListView::MessageReceived (msg);  }}
开发者ID:xray7224,项目名称:Vision,代码行数:53,


示例6: trace_resolve_path

/* * Resolve the trace path, throwing an error if it is not found. */voidtrace_resolve_path(void){	trace_path = which("strace");	if (trace_path == NULL) {		trace_path = which("dtruss");		use_dtruss = 1;	}	if (trace_path == NULL)		errx(1, "strace (or dtruss) is not in your PATH");}
开发者ID:tamentis,项目名称:pg_trace,代码行数:16,


示例7: normalize_initialize

int normalize_initialize(settings_t *settings){    int ret = 1;    struct stat statbuf;    if (settings)    {        if (which("normalize",settings->normalize_path,                  MAX_PATH_LEN) == 0)        {            ret = 0;        }        else        {            memset(&statbuf,0,sizeof(statbuf));            if (stat(NORMALIZE_PATH,&statbuf) ||                (!(statbuf.st_mode & S_IXUSR)))            {                fprintf(stderr,"Cannot find required program "                        "normalize./nPlease install this program "                        "either from your vendor, or visit:/n/n%s/n",                        NORMALIZE_DOWNLOAD_SITE);            }            else            {                memcpy(settings->normalize_path,NORMALIZE_PATH,                       MIN(strlen(NORMALIZE_PATH),MAX_PATH_LEN-1));                ret = 0;            }        }    }    return ret;}
开发者ID:thecodefactory,项目名称:audio_burn,代码行数:34,


示例8: main

intmain(int argc, char *argv[]){	char *path;	int found = 0, foundall = 1;	ARGBEGIN {	case 'a':		aflag = 1;		break;	default:		usage();	} ARGEND	if (!argc)		usage();	if (!(path = getenv("PATH")))		enprintf(3, "$PATH is not set/n");	for (; *argv; argc--, argv++) {		if (which(path, *argv)) {			found = 1;		} else {			weprintf("%s: command not found./n", *argv);			foundall = 0;		}	}	return found ? foundall ? 0 : 1 : 2;}
开发者ID:maandree,项目名称:sbase,代码行数:31,


示例9: QWidget

MainWindow::MainWindow(QWidget *parent): QWidget(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint) {	active_index_ = -1;	edit_index_ = -1;	animation_id_ = 0;	stats_ = new StatsDialog();	connect(this, SIGNAL(cycleReadySignal()), stats_, SLOT(cycleReady()));		if (!which("firejail")) {		QMessageBox::warning(this, tr("Firejail Tools"),			tr("<br/><b>Firejail</b> sandbox not found.<br/><br/><br/>"));		exit(1);	}	applications_init();	createTrayActions();	createLocalActions();	thread_ = new PidThread();	connect(thread_, SIGNAL(cycleReady()), this, SLOT(cycleReady()));	setContextMenuPolicy(Qt::ActionsContextMenu);	setToolTip(tr("Double click on an icon to open an application./n"		"Drag the launcher with the left mouse button./n"		"Use the right mouse button to open a context menu."));	setWindowTitle(tr("Firejail Tools"));	}
开发者ID:ashleyblackmore,项目名称:firejail,代码行数:26,


示例10: prior

				virtual void prior(position_interface<types>& pos) {					switch (which(pos)) {					case commands::next:						advance_prior<0>(pos);						break;					case commands::prior:						advance_prior<1>(pos);						break;					case commands::inc:						advance_prior<2>(pos);						break;					case commands::dec:						advance_prior<3>(pos);						break;					case commands::out:						advance_prior<4>(pos);						break;					case commands::in:						advance_prior<5>(pos);						break;					case commands::begin:						advance_prior<6>(pos);						break;					case commands::end:						advance_prior<7>(pos);						break;					default:						pos.prior();						break;					}				}
开发者ID:bolero-MURAKAMI,项目名称:Sprig,代码行数:31,


示例11: switch

bool Attribute::operator==( const Attribute& other ) const {  if( which() != other.which() )    return false;  switch( which() ) {  case 0:    return boost::get< int >( *this ) == boost::get< int >( other );  case 1:    return boost::get< string >( *this ) == boost::get< string >( other );  case 2:    return boost::get< double >( *this ) == boost::get< double >( other );  case 3:    return boost::get< Date >( *this ) == boost::get< Date >( other );  default:    throw ActiveRecordException( "Unexpected Attribute type", __FILE__, __LINE__ );  }}
开发者ID:intelligentsia,项目名称:cpp-active-record,代码行数:16,


示例12: createAggregateFunctionQuantile

AggregateFunctionPtr createAggregateFunctionQuantile(const std::string & name, const DataTypes & argument_types, const Array & params){    /// Second argument type check doesn't depend on the type of the first one.    Function<void>::assertSecondArg(argument_types);    const DataTypePtr & argument_type = argument_types[0];    WhichDataType which(argument_type);#define DISPATCH(TYPE) /    if (which.idx == TypeIndex::TYPE) return std::make_shared<Function<TYPE>>(argument_type, params);    FOR_NUMERIC_TYPES(DISPATCH)#undef DISPATCH#undef FOR_NUMERIC_TYPES    if (which.idx == TypeIndex::Date) return std::make_shared<Function<DataTypeDate::FieldType>>(argument_type, params);    if (which.idx == TypeIndex::DateTime) return std::make_shared<Function<DataTypeDateTime::FieldType>>(argument_type, params);    if constexpr (SupportDecimal<Function>())    {        if (which.idx == TypeIndex::Decimal32) return std::make_shared<Function<Decimal32>>(argument_type, params);        if (which.idx == TypeIndex::Decimal64) return std::make_shared<Function<Decimal64>>(argument_type, params);        if (which.idx == TypeIndex::Decimal128) return std::make_shared<Function<Decimal128>>(argument_type, params);    }    throw Exception("Illegal type " + argument_type->getName() + " of argument for aggregate function " + name,                    ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);}
开发者ID:chipitsine,项目名称:ClickHouse,代码行数:26,


示例13: assert

::OSStatus label_subevent_handler_t::handle_event(::EventHandlerCallRef /*next*/,                                                  ::EventRef            event){    if (!callback_m)        return noErr;    assert (::GetEventClass(event) == kEventClassControl);    label_subevent_t which(subevent_none_s);    switch (::GetEventKind(event))    {        case kEventControlClick:        case kEventControlHit:            which = subevent_mouse_down_s;            break;        case kEventControlTrackingAreaEntered:            which = subevent_mouse_in_s;            break;        case kEventControlTrackingAreaExited:            which = subevent_mouse_out_s;            break;        default:            throw std::runtime_error("unknown case");    }    callback_m(which);    return noErr;}
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:30,


示例14: setup

voidsetup (void){  char *temp;  struct passwd *pw;  /* If we're running as root, seteuid to notes. */  pw = getpwnam (NOTES);  notes_uid = pw->pw_uid;  if (geteuid () == 0)    seteuid (notes_uid);  pw = getpwnam (ANON);  anon_uid = pw->pw_uid;  pw = getpwuid (geteuid ());  username = newts_strdup (pw->pw_name);  euid = pw->pw_uid;  fqdn = newts_get_fqdn ();  tmpdir = newts_strdup ((temp = getenv ("TMPDIR")) ? temp : "/tmp");  shell = which ((temp = getenv ("SHELL")) ? temp : pw->pw_shell);  endpwent ();  /* FIXME: I should do something about the environment here.   *   * ... Namely, nuke it.   */}
开发者ID:tylerberry,项目名称:newts,代码行数:34,


示例15: copy_construct_value

		void copy_construct_value(variant const &from)		{			static std::array<void(*)(variant &, variant const &), sizeof...(T)> const copy_constructors =			{{				&copy_construct<T>...			}};			copy_constructors[which()](*this, from);		}
开发者ID:TyRoXx,项目名称:how-to-variant,代码行数:8,


示例16: cmd_which

int cmd_which (int argc,char **argv,struct sub_command* cmd) {  if(argc==2) {    char* str=which(argv[1]);    printf("%s/n",str);    s(str);  }  return 0;}
开发者ID:deadtrickster,项目名称:roswell,代码行数:8,


示例17:

inline bool operator== (const ::Datagram::DatagramKey::Reader& a, const ::Datagram::DatagramKey::Reader& b) {    if (a.getKey().which() != b.getKey().which())        return false;    if (a.getKey().isContestKey()) {        auto ac = a.getKey().getContestKey().getCreator();        auto bc = b.getKey().getContestKey().getCreator();        if (ac.which() != bc.which())            return false;        if (ac.isAnonymous())            return bc.isAnonymous();        return ac.getSignature().getId() == bc.getSignature().getId() &&                ac.getSignature().getSignature() == bc.getSignature().getSignature();    }    auto ad = a.getKey().getDecisionKey().getBalanceId();    auto bd = b.getKey().getDecisionKey().getBalanceId();    return ad.getAccountInstance() == bd.getAccountInstance() && ad.getCoinInstance() == bd.getCoinInstance();}
开发者ID:djbdgr,项目名称:StakeWeightedVoting,代码行数:17,


示例18: main

int main (){	good ();	good ();	good ();	which ();	return 0;}
开发者ID:Ephzent,项目名称:studycode,代码行数:8,


示例19: open_feed

/* * Opens the input data-feed. Given a feedname (path in the file system), * determine what type of input feed it is.  Attempt to open * the feed. Hook up the appropriate read_,  _stats, and (optional) _close * function pointers.  Return errno on failure else set *fdp to the descriptor * and return 0. * * @param feedfname     [in] The name of the input data-feed * @param fdp           [out] The file-descriptor of the input data-feed * @param maxProdSize   [in] The size, in bytes, of the largest expected *                      data-product * Returns (if INPUT_IS_SOCKET): *   ENOENT        gethostbyname() failure. *   EAFNOSUPPORT  AF_INET address-family not supported. *   EMFILE        No more file descriptors available for this process. *   ENFILE        No more file descriptors available for the system. *   EACCES        The process does not have appropriate privileges. *   ENOBUFS       Insufficient resources were available in the system to *                 perform the operation. *   ENOMEM        Insufficient memory was available to fulfill the request. *   ENOSR         There were insufficient STREAMS resources available for the  *                 operation to complete. *   EADDRNOTAVAIL The specified address is not available from the local  *                 machine. *   ECONNREFUSED  The target address was not listening for connections or  *                 refused the connection request. *   EINTR         The attempt to establish a connection was interrupted by *                 delivery of a signal that was caught; the connection will be *                 established asynchronously. *   ENETUNREACH   No route to the network is present. *   EPROTOTYPE    The specified address has a different type than the socket  *                 bound to the specified peer address. *   ETIMEDOUT     The attempt to connect timed out before a connection was  *                 made. *   ECONNRESET    Remote host reset the connection request. *   EHOSTUNREACH  The destination host cannot be reached (probably because the *                 host is down or a remote router cannot reach it). *   ENETDOWN      The local interface used to reach the destination is down. */intopen_feed(const char *feedfname, int *const fdp, const unsigned long maxProdSize){        extern char *rawfname; /* declared in main() module */        int status = ENOERR;#if NET        if(INPUT_IS_SOCKET)        {                status = port_open(feedfname,                                (unsigned short) server_port, fdp);                if(status != ENOERR)                        return status;                if((status = initTheXbuf(read_file, maxProdSize)) != ENOERR)                        return status;                feed_stats = file_stats;                feed_close = file_close;        }        else    /* dangling else */#endif /* NET */        switch( which(feedfname) ) {#ifdef TTY        case TTY :                if((status = tty_open(feedfname, fdp)) != ENOERR)                        return status;                if((status = initTheXbuf(read_tty, maxProdSize)) != ENOERR)                        return status;                feed_stats = tty_stats;                feed_close = tty_close;                break;#endif /* TTY */        default :                /* just treat it like a file */                if(*feedfname == '-' && feedfname[1] == 0)                {                        /* use stdin */                        *fdp = fileno(stdin);                        unotice("FILE stdin");                }                else                {                        if((status = file_open(feedfname, fdp)) != ENOERR)                                return status;                }                if((status = initTheXbuf(read_file, maxProdSize)) != ENOERR)                        return status;                feed_stats = file_stats;                feed_close = file_close;                break;        }        if(rawfname != NULL)        {                (void) open_rawfile( rawfname );        }        return status;}
开发者ID:PatrickHildreth-NOAA,项目名称:LDM,代码行数:97,


示例20: variant

		variant(variant &&other)			: m_which(other.m_which)		{			static std::array<void(*)(variant &, variant &&), sizeof...(T)> const move_constructors =			{{				&move_construct<T>...			}};			move_constructors[which()](*this, std::move(other));		}
开发者ID:TyRoXx,项目名称:how-to-variant,代码行数:9,


示例21: stri_subset_charclass

/** * Detect if a character class occurs in a string * * @param str character vector * @param pattern character vector * @param omit_na single logical value * @return logical vector * * @version 0.3-1 (Bartek Tartanus, 2014-07-25) * * @version 0.3-1 (Marek Gagolewski, 2014-10-17) *                using std::vector<int> to avoid mem-leaks * * @version 0.3-1 (Marek Gagolewski, 2014-11-04) *    Issue #112: str_prepare_arg* retvals were not PROTECTed from gc * * @version 0.4-1 (Marek Gagolewski, 2014-12-04) *    FR #122: omit_na arg added * * @version 1.0-3 (Marek Gagolewski, 2016-02-03) *    FR #216: `negate` arg added */SEXP stri_subset_charclass(SEXP str, SEXP pattern, SEXP omit_na, SEXP negate){   bool negate_1 = stri__prepare_arg_logical_1_notNA(negate, "negate");   bool omit_na1 = stri__prepare_arg_logical_1_notNA(omit_na, "omit_na");   PROTECT(str = stri_prepare_arg_string(str, "str"));   PROTECT(pattern = stri_prepare_arg_string(pattern, "pattern"));   R_len_t vectorize_length =      stri__recycling_rule(true, 2, LENGTH(str), LENGTH(pattern));   STRI__ERROR_HANDLER_BEGIN(2)   StriContainerUTF8 str_cont(str, vectorize_length);   StriContainerCharClass pattern_cont(pattern, vectorize_length);   // BT: this cannot be done with deque, because pattern is reused so i does not   // go like 0,1,2...n but 0,pat_len,2*pat_len,1,pat_len+1 and so on   // MG: agreed   std::vector<int> which(vectorize_length);   int result_counter = 0;   for (R_len_t i = pattern_cont.vectorize_init();         i != pattern_cont.vectorize_end();         i = pattern_cont.vectorize_next(i))   {      if (str_cont.isNA(i) || pattern_cont.isNA(i)) {         if (omit_na1) which[i] = FALSE;         else {            which[i] = NA_LOGICAL;            result_counter++;         }         continue;      }      const UnicodeSet* pattern_cur = &pattern_cont.get(i);      R_len_t     str_cur_n = str_cont.get(i).length();      const char* str_cur_s = str_cont.get(i).c_str();      UChar32 chr = 0;      which[i] = FALSE;      for (R_len_t j=0; j<str_cur_n; ) {         U8_NEXT(str_cur_s, j, str_cur_n, chr);         if (chr < 0) // invalid utf-8 sequence            throw StriException(MSG__INVALID_UTF8);         if (pattern_cur->contains(chr)) {            which[i] = TRUE;            break;         }      }      if (negate_1) which[i] = !which[i];      if (which[i]) result_counter++;   }   SEXP ret;   STRI__PROTECT(ret = stri__subset_by_logical(str_cont, which, result_counter));   STRI__UNPROTECT_ALL   return ret;   STRI__ERROR_HANDLER_END(;/* nothing special to be done on error */)}
开发者ID:GuillaumeSmaha,项目名称:stringi,代码行数:79,


示例22: main

int main(){    std::tuple<int, bool, double, int> t(42, true, 3.14, 1337);    int i = 0;    auto var = get(i, t);    if (var.which() == i)        std::cout << "yay";    else        std::cout << "nay";}
开发者ID:CCJY,项目名称:coliru,代码行数:10,


示例23: ButtonEditor_create

autoButtonEditor ButtonEditor_create () {	try {		autoButtonEditor me = Thing_new (ButtonEditor);		HyperPage_init (me.get(), U"Buttons", nullptr);		which (me.get(), 1);		return me;	} catch (MelderError) {		Melder_throw (U"Buttons window not created.");	}}
开发者ID:ghedlund,项目名称:libpraat,代码行数:10,


示例24: apply_visitor

		auto apply_visitor(Visitor &&visitor) const		{			typedef typename std::decay<Visitor>::type clean_visitor;			typedef typename clean_visitor::result_type result_type;			static std::array<result_type(*)(variant const &, Visitor &), sizeof...(T)> const methods =			{{				&apply_visitor_method_const<result_type, T, Visitor>...			}};			return methods[which()](*this, visitor);		}
开发者ID:TyRoXx,项目名称:how-to-variant,代码行数:10,


示例25: propagate

void type_operator::propagate(contexts& ctxs){    // add check here for _kind valid in context    for(auto it = begin(); it != end(); it++) {        if(it->which()) {            auto& op = boost::get<type_operator>(*it);            op.propagate(ctxs);        } else {            auto& tv = boost::get<type_variable>(*it);            tv.propagate(ctxs);        }    }}
开发者ID:abnormallylargesquirrel,项目名称:alang,代码行数:13,


示例26: iter

void tButtonTest::keyPressEvent( QKeyEvent* e ){    if ( ( ( ( m_HAL.PlatformId() != ePlatformCassius ) &&  ( e->key() == tKeyMapping::PhysicalKeyOf( tKeyMapping::eKM_Navico_StbyAuto ) ) ) ||           e->key() == tKeyMapping::PhysicalKeyOf( tKeyMapping::eKM_MainWidget_NextPage ) ||           e->key() == tKeyMapping::PhysicalKeyOf( tKeyMapping::eKM_MainWidget_PrevPage ) ) &&         m_IsInKeymode == false )    {        e->ignore();        return;    }    QHash<int, tButtonTestButton*>::const_iterator iter( m_KeyToButtonHash.find( ( int )e->key() ) );    if ( iter == m_KeyToButtonHash.end() )    {        DbgPrintf( "Ignoring key event %d", e->key() );        e->ignore();        return;    }    tButtonTestButton* which( iter.value() );    if ( e->type() == QEvent::KeyPress )    {        which->setDown( true );        if ( e->isAutoRepeat() == false )        {            m_HAL.Buzzer()->KeyBeep();        }        return;    }    else if ( e->type() == QEvent::KeyRelease )    {        which->setDown( false );        return;    }    else if ( m_IgnoreKeys )    {        // UI refreshed - allow parent to handle as well        e->ignore();        return;    }    else    {        DbgPrintf( "Ignoring unknown event %d for key %d", e->type(), e->key() );        e->ignore();        return;    }}
开发者ID:dulton,项目名称:53_hero,代码行数:51,


示例27: main

int main() {    int a[100], T, i;    a[0] = 0;    a[1] = 1;    for (i = 2; i < 100; i++) {        a[i] = a[i - 2] + a[i - 1];    }    scanf("%d", &T);    int b[T];    for (i = 0; i < T; i++) {        scanf("%d", &b[i]);        printf("%d/n", which(a, b[i]));    }}
开发者ID:ixidian,项目名称:c-and-cpp-language-learning,代码行数:14,


示例28: run_man

static intrun_man(struct subcommand *scp, int argc, char **argv){	char *berictl_rpath, *manpage, *prog;	if (berictl_path != NULL &&	    (berictl_rpath = which(berictl_path)) != NULL) {		if (asprintf(&manpage, "%s.1", berictl_rpath) > 0) {			if ((prog = which("mandoc")) != NULL) {				execl(prog, prog, manpage, NULL);				exit(1);			} else if ((prog = which("nroff")) != NULL) {				execl(prog, prog, "-S", "-Tascii", "-man",				    manpage, NULL);				exit(1);			}		}		free(berictl_rpath);		free(manpage);	}	execlp("man", "man", "1", "berictl", NULL);	exit(1);}
开发者ID:8l,项目名称:beri,代码行数:23,


示例29: backward

				virtual void backward(position_interface<types>& pos) {					int c = -1;					do {						prior(pos);						switch (which(pos)) {						case commands::begin:							++c;							break;						case commands::end:							--c;							break;						}					} while (c);				}
开发者ID:bolero-MURAKAMI,项目名称:Sprig,代码行数:14,



注:本文中的which函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ while_each_thread函数代码示例
C++ wherex函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。