Dune::Std Namespace Reference

Namespaces

namespace  Imp
namespace  Impl

Classes

struct  MakeUniqueHelper
struct  MakeUniqueHelper< T[]>
struct  MakeUniqueHelper< T[N]>
class  to_false_type
 template mapping a type to std::false_type More...
class  to_true_type
 template mapping a type to std::true_type More...
struct  is_callable< F(Args...), R >
 Traits class to check if function is callable. More...

Functions

template<class F , class ArgTuple >
 decltype (auto) apply(F &&f
 Apply function with arguments given as tuple.
template<typename... Args>
std::array< typename
std::common_type< Args...>
::type, sizeof...(Args)> 
make_array (const Args &...args)
 Create and initialize an array.
template<typename T , typename... Args>
MakeUniqueHelper< T >
::NonArrayUniquePtr 
make_unique (Args &&...args) = delete
 Implementation of std::make_unique to be introduced in C++14.
template<typename T >
MakeUniqueHelper< T >
::UnknownBoundArrayUniquePtr 
make_unique (size_t n)
 Implementation of std::make_unique to be introduced in C++14.

Function Documentation

template<class F , class ArgTuple >
Dune::Std::decltype ( auto   )  [inline]

Apply function with arguments given as tuple.

Parameters:
f A callable object
args Tuple of arguments

This will call the function with arguments generated by unpacking the tuple.

template<typename... Args>
std::array<typename std::common_type<Args...>::type, sizeof...(Args)> Dune::Std::make_array ( const Args &...  args  )  [inline]

Create and initialize an array.

Note:
This method is a somewhat limited dune-specific version of make_array() as proposed for C++17 (see N4391, accepted May 2015). The differences are that this version should never be used with expliclitly given template arguments, or with std::reference_wrapper<...> arguments, and we do not give a diagnostic when anyone happens to do that.
template<typename T >
MakeUniqueHelper<T>::UnknownBoundArrayUniquePtr Dune::Std::make_unique ( size_t  n  )  [inline]

Implementation of std::make_unique to be introduced in C++14.

Template Parameters:
T Array type of unknown bound
Parameters:
n Size of array to allocate
template<typename T , typename... Args>
MakeUniqueHelper< T >::KnownBoundArrayUniquePtr Dune::Std::make_unique ( Args &&...  args  )  = delete [inline]

Implementation of std::make_unique to be introduced in C++14.

Template Parameters:
T Nonarray type of object to be constructed
...Args Parameter types for constructor of T
Parameters:
args Arguments to be passed to constructor of T

This fallback implementation using perfect forwarding as proposed by Herb Sutter in http://herbsutter.com/gotw/_102/

Template Parameters:
T Array type of known bound
Args Dummy arguments

This is deleted, since, according to the standard this should not participate in overload resolution

Parameters:
args Dummy arguments
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 25 Mar 2018 for dune-common by  doxygen 1.6.1