Loading [MathJax]/extensions/TeX/AMSsymbols.js
CGAL Version:
master
6.0.1
latest
5.6.2
5.5.5
5.4.5
5.3.2
5.2.4
5.1.5
5.0.4
4.14.3
4.13.2
4.12.2
4.11.3
4.10.2
4.9.1
4.8.2
4.7
4.6.3
4.5.2
4.4
4.3
cgal.org
Top
Getting Started
Tutorials
Package Overview
Acknowledging CGAL
CGAL 6.0.1 - STL Extensions for CGAL
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Friends
Modules
Pages
Loading...
Searching...
No Matches
STL_Extension/Default.cpp
#include <CGAL/Default.h>
#include <CGAL/use.h>
// A is a concrete type
struct
A {};
void
use_a(A) {}
// B is the template class which has 2 template parameters
// with default arguments : A and int.
template
<
typename
A1_ = A,
typename
A2 =
int
>
struct
B
{
B()
: a1()
{}
// Note that it is also possible to use CGAL::Default
// instead of A as the default argument for A1_ above.
// Extract the desired type for A1 :
typedef
typename
CGAL::Default::Get<A1_, A>::type
A1;
A1 a1;
};
int
main ()
{
B<CGAL::Default, double> b;
use_a(b.a1);
// It is really of type A.
}
unspecified_type