代码搜索:explicit
找到约 10,000 项符合「explicit」的源代码
代码结果 10,000
www.eeworm.com/read/470720/1446338
c explicit82.c
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 7 Sep 2000
// Bug 508. We failed to set/clear lastiddecl appropria
www.eeworm.com/read/470720/1446361
c explicit62.c
extern "C" void abort ();
template void f ()
{
}
template class C
{
friend void f ();
public:
void ff () { f (); }
};
int main ()
{
C c;
c.ff();
}
www.eeworm.com/read/470720/1446386
c explicit29.c
// Build don't run:
// GROUPS passed templates
template
int foo(T) { return 0; }
int foo(int);
int main()
{
return foo(3);
}
www.eeworm.com/read/470720/1446390
c explicit17.c
// Build don't link:
// GROUPS passed templates
// Special g++ Options: -ansi -pedantic-errors -w
template
void foo(U u, T t);
template
void foo(T t);
template
www.eeworm.com/read/470720/1446393
c explicit22.c
// Build don't link:
// GROUPS passed templates
template
T foo(T t, U* u);
template
T foo(T t, T* u);
template
int foo(int, int*);
www.eeworm.com/read/470720/1446417
c explicit14.c
// Build don't link:
// GROUPS passed templates
template
struct S
{
template
typename U::R foo(U u);
};
void bar()
{
S si;
}
www.eeworm.com/read/470720/1446441
c explicit2.c
// Build don't link:
// GROUPS passed templates
template
void foo(T t) {}
void bar()
{
(void (*)(int)) (void (*)(double)) &foo;
}
www.eeworm.com/read/470720/1446846
c explicit1.c
// $7.1.2 disallows explicit on anything but declarations of
// constructors ... including friends.
class foo { public: foo(); };
class bar { public: friend explicit foo::foo(); }; // ERROR - explicit
www.eeworm.com/read/470720/1447198
c explicit1.c
struct A1 {
explicit A1(int) { }
} a1(1);
struct A {
explicit A(int);
} a(1);
A::A(int) {
}
void foo(A a) {
foo(a);
foo(1); // ERROR - not allowed
}
www.eeworm.com/read/470720/1447547
c explicit2.c
// Build don't link:
class string {
public:
string(const char*) { }
explicit string(int size) { }
};
void foo(string) { }
string bar() {
foo("hello"); // ok
foo(string(2)); // ok
foo(2