Download TASKING VX-toolset for ARM User Guide
Transcript
TASKING VX-toolset for ARM User Guide
printf("%d\n", B<A<int>::C>::e);
}
• An incorrect number of template <> clauses is allowed on a full specialization (i.e., one with no
remaining template parameters). A warning is issued.
template <class T> struct A {
template <class U> struct B { };
};
template <> struct A<int> {
template <class U> struct B { };
};
template <> template <> struct A<int>::B<double> { };
• An incorrect number of template <> clauses is allowed on a friend class template declaration. A
warning is issued.
template <typename T> struct A {
template <typename U> class B {
template <typename V> friend class B;
};
};
• Template parameters that are not used in the signature of a function template are not ignored for partial
ordering purposes (i.e., the resolution of core language issue 214 is not implemented) when gnu_version
is < 40100.
template <class S, class T> void f(T t);
template <class T> void f(T t);
int main() {
f<int>(3); // not ambiguous when gnu_version
// is < 40100
}
• Prototype instantiations of functions are deferred until the first actual instantiation of the function to
allow the compilation of programs that contain definitions of unusable function templates (gnu_version
30400 and above). The example below is accepted when prototype instantiations are deferred.
class A {};
template <class T> struct B {
B () {}; // error: no initializer for
// reference member "B<T>::a"
A& a;
};
56
Related documents
TASKING VX-toolset for ARM User Guide
v1.1 ARM Tools Reference
Using the ARM Embedded Tools
A8810-0 - Obvius
TR114 Universal PCI Board Hardware Manual
TR114™ ISA Analog
TR114™ PCI Digital Hardware Guide
User`s manual control unit CCMon10
STM32 USB-FS-Device development kit
TR0131 ARM Embedded Tools Reference
From Zero To Blinky With EmBlocks and STM32L100 Series
Chip1768 User's Manual