代码搜索:explicit
找到约 10,000 项符合「explicit」的源代码
代码结果 10,000
www.eeworm.com/read/440906/1776440
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/440906/1776465
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/440906/1776469
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/440906/1776472
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/440906/1776496
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/440906/1776520
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/440906/1776925
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/440906/1777277
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/440906/1777626
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
www.eeworm.com/read/402654/2318645
hpp power_explicit.hpp
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University. All rights reserved.
// Authors: Peter Gottschling and Andrew Lumsdaine
//
// This file is part of the Matrix