Renaming before documenting: Default_argument -> Default.

This commit is contained in:
Sylvain Pion 2009-04-10 21:55:24 +00:00
parent f22e4b7088
commit f55c8e9a2f
4 changed files with 24 additions and 27 deletions

2
.gitattributes vendored
View File

@ -3194,7 +3194,7 @@ Ridges_3/test/Ridges_3/data/ellipsoid.off -text svneol=unset#application/octet-s
Robustness/demo/Robustness/help/index.html svneol=native#text/html
STL_Extension/doc_tex/STL_Extension/plusplus.png -text
STL_Extension/doc_tex/STL_Extension_ref/Uncertain.tex -text
STL_Extension/include/CGAL/Default_argument.h -text
STL_Extension/include/CGAL/Default.h -text
STL_Extension/include/CGAL/array.h -text
STL_Extension/include/CGAL/type_traits.h -text
STL_Extension/test/STL_Extension/test_Uncertain.cpp -text

View File

@ -30,7 +30,7 @@
#include <CGAL/min_max_n.h>
#include <CGAL/Origin.h>
#include <vector>
#include <CGAL/Default_argument.h>
#include <CGAL/Default.h>
#ifdef CGAL_HAS_THREADS
# include <boost/thread/tss.hpp>
@ -1684,7 +1684,7 @@ public:
//____________________________________________________________
// The magic functor that has Lazy<Something> as result type
template <typename LK, typename AC, typename EC, typename E2A_ = Default_argument>
template <typename LK, typename AC, typename EC, typename E2A_ = Default>
struct Lazy_construction
{
static const bool Protection = true;
@ -1692,7 +1692,7 @@ struct Lazy_construction
typedef typename LK::Approximate_kernel AK;
typedef typename LK::Exact_kernel EK;
typedef typename EK::FT EFT;
typedef typename If_default_argument<E2A_, typename LK::E2A>::type E2A;
typedef typename Default::Get<E2A_, typename LK::E2A>::type E2A;
typedef typename AC::result_type AT;
typedef typename EC::result_type ET;
typedef Lazy<AT, ET, EFT, E2A> Handle;

View File

@ -21,7 +21,7 @@
#define CGAL_COMPACT_CONTAINER_H
#include <CGAL/basic.h>
#include <CGAL/Default_argument.h>
#include <CGAL/Default.h>
#include <iterator>
#include <algorithm>
@ -109,11 +109,11 @@ namespace CGALi {
class CC_iterator;
}
template < class T, class Allocator_ = Default_argument >
template < class T, class Allocator_ = Default >
class Compact_container
{
typedef Allocator_ Al;
typedef typename If_default_argument<Al, CGAL_ALLOCATOR(T) >::type Allocator;
typedef typename Default::Get< Al, CGAL_ALLOCATOR(T) >::type Allocator;
typedef Compact_container <T, Al> Self;
typedef Compact_container_traits <T> Traits;
public:

View File

@ -1,4 +1,4 @@
// Copyright (c) 2007 INRIA Sophia-Antipolis (France). All rights reserved.
// Copyright (c) 2007,2009 INRIA Sophia-Antipolis (France). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
@ -16,33 +16,30 @@
//
// Author(s) : Sylvain Pion
#ifndef CGAL_DEFAULT_ARGUMENT_H
#define CGAL_DEFAULT_ARGUMENT_H
#ifndef CGAL_DEFAULT_H
#define CGAL_DEFAULT_H
// Default_argument is a tag that can be used to shrink mangled names and
namespace CGAL {
// Default is a tag that can be used to shrink mangled names and
// error messages in place of the default value of template arguments.
// It could also be used by users to specify default values to arguments which
// are not at the end of the argument list.
// It can also be useful to easily break cyclic dependencies in templates.
// Maybe we should provide a macro to disable it so as to show the arguments?
// Maybe we could document it?
// If_default_argument is a helper class which helps using this scheme.
struct Default
{
template <typename Argument, typename Value>
struct Get {
typedef Argument type;
};
namespace CGAL {
struct Default_argument;
template < typename Argument, typename Default >
struct If_default_argument {
typedef Argument type;
};
template < typename Default >
struct If_default_argument <Default_argument, Default> {
typedef Default type;
template <typename Value>
struct Get <Default, Value> {
typedef Value type;
};
};
}
#endif // CGAL_DEFAULT_ARGUMENT_H
#endif // CGAL_DEFAULT_H