8#ifndef INCLUDED_BSLMF_UTIL
9#define INCLUDED_BSLMF_UTIL
190#include <bslscm_version.h>
219#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
220 template <
class t_TYPE>
223 template <
class t_TYPE>
227 template <
class t_TYPE>
230 template <
class t_TYPE>
237#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
238 template <
class t_MODEL,
class t_TYPE>
241 const typename bsl::remove_reference<t_TYPE>::type&
247 typename bsl::remove_reference<t_MODEL>::type>::value>::type * = 0)
249 template <class t_MODEL, class t_TYPE>
255 typename
bsl::enable_if<
256 bsl::is_lvalue_reference<t_MODEL>::value &&
258 typename
bsl::remove_reference<t_MODEL>::type>::value>::type * = 0)
260 template <class t_MODEL, class t_TYPE>
263 const typename
bsl::remove_reference<t_TYPE>::type&&
266 typename
bsl::enable_if<
267 !
bsl::is_lvalue_reference<t_MODEL>::value &&
269 typename
bsl::remove_reference<t_MODEL>::type>::value>::type * = 0)
271 template <class t_MODEL, class t_TYPE>
274 typename
bsl::remove_reference<t_TYPE>::type&&
277 typename
bsl::enable_if<
278 !
bsl::is_lvalue_reference<t_MODEL>::value &&
280 typename
bsl::remove_reference<t_MODEL>::type>::value>::type * = 0)
283 template <
class t_MODEL,
class t_TYPE>
292 t_MODEL>::type>::value>::type * = 0)
294 template <class t_MODEL, class t_TYPE>
300 typename
bsl::enable_if<
303 t_MODEL>::type>::value>::type * = 0)
305 template <class t_MODEL, class t_TYPE>
311 typename
bsl::enable_if<
314 t_MODEL>::type>::value>::type * = 0)
316 template <class t_MODEL, class t_TYPE>
322 typename
bsl::enable_if<
325 t_MODEL>::type>::value>::type * = 0)
327 template <class t_MODEL, class t_TYPE>
333 typename
bsl::enable_if<
336 t_MODEL>::type>::value>::type * = 0)
338 template <class t_MODEL, class t_TYPE>
344 typename
bsl::enable_if<
347 t_MODEL>::type>::value>::type * = 0)
349 template <class t_MODEL, class t_TYPE>
355 typename
bsl::enable_if<
358 t_MODEL>::type>::value>::type * = 0)
360 template <class t_MODEL, class t_TYPE>
366 typename
bsl::enable_if<
369 t_MODEL>::type>::value>::type * = 0)
379#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
380 template <
class t_TYPE>
382 typename bsl::add_rvalue_reference<t_TYPE>::type
385 template <
class t_TYPE>
394#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
395 template <
class t_TYPE>
398 template <
class t_TYPE>
402 template <
class t_TYPE>
405 template <
class t_TYPE>
417#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
418 template <
class t_TYPE>
420 typename bsl::remove_reference<t_TYPE>::type&&
423 template <
class t_TYPE>
439#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
440template <
class t_TYPE>
445 return static_cast<t_TYPE&&
>(t);
448template <
class t_TYPE>
453 return static_cast<t_TYPE&&
>(t);
458template <
class t_TYPE>
465template <
class t_TYPE>
474#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
475template <
class t_MODEL,
class t_TYPE>
477const typename bsl::remove_reference<t_TYPE>::type&
483 typename bsl::remove_reference<t_MODEL>::type>::value>::type *)
489template <
class t_MODEL,
class t_TYPE>
497 typename bsl::remove_reference<t_MODEL>::type>::value>::type *)
500 return static_cast<t_TYPE&
>(t);
503template <
class t_MODEL,
class t_TYPE>
505const typename bsl::remove_reference<t_TYPE>::type&&
511 typename bsl::remove_reference<t_MODEL>::type>::value>::type *)
514 return static_cast<typename bsl::remove_reference<t_TYPE>::type&&
>(t);
517template <
class t_MODEL,
class t_TYPE>
519typename bsl::remove_reference<t_TYPE>::type&&
525 typename bsl::remove_reference<t_MODEL>::type>::value>::type *)
528 return static_cast<typename bsl::remove_reference<t_TYPE>::type&&
>(t);
531template <
class t_MODEL,
class t_TYPE>
539 t_MODEL>::type>::value>::type *)
542 return static_cast<const t_TYPE&
>(t);
545template <
class t_MODEL,
class t_TYPE>
553 t_MODEL>::type>::value>::type *)
556 return static_cast<const t_TYPE&
>(t);
559template <
class t_MODEL,
class t_TYPE>
567 t_MODEL>::type>::value>::type *)
570 return static_cast<t_TYPE&
>(t);
573template <
class t_MODEL,
class t_TYPE>
581 t_MODEL>::type>::value>::type *)
587template <
class t_MODEL,
class t_TYPE>
595 t_MODEL>::type>::value>::type *)
601template <
class t_MODEL,
class t_TYPE>
609 t_MODEL>::type>::value>::type *)
615template <
class t_MODEL,
class t_TYPE>
624 t_MODEL>::type>::value>::type *)
630template <
class t_MODEL,
class t_TYPE>
638 t_MODEL>::type>::value>::type *)
645#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
646template <
class t_TYPE>
651 return static_cast<t_TYPE&&
>(t);
654template <
class t_TYPE>
659 return static_cast<t_TYPE&&
>(t);
664template <
class t_TYPE>
671template <
class t_TYPE>
680#ifdef BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES
686 return static_cast<typename bsl::remove_reference<t_T>::type&&
>(t);
696 return static_cast<typename bsl::remove_reference<t_T>::type&
>(t);
Definition bslmf_movableref.h:751
#define BSLA_NODISCARD
Definition bsla_nodiscard.h:320
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_CONSTEXPR
Definition bsls_keyword.h:588
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
Definition bdlb_printmethods.h:283
Definition bdlbb_blob.h:576
t_TYPE & type
This typedef defines the return type of this meta function.
Definition bslmf_addlvaluereference.h:129
Definition bslmf_enableif.h:525
Definition bslmf_isconst.h:144
Definition bslmf_islvaluereference.h:125
Definition bslmf_movableref.h:801
Definition bslmf_movableref.h:825
Definition bslmf_movableref.h:791
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1060
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1032
Definition bslmf_removereference.h:213
Definition bslmf_util.h:216
static BSLS_KEYWORD_CONSTEXPR bsl::add_lvalue_reference< t_TYPE >::type declval() BSLS_KEYWORD_NOEXCEPT
static BSLS_KEYWORD_CONSTEXPR MovableRef< t_TYPE > forward(MovableRef< t_TYPE > t) BSLS_KEYWORD_NOEXCEPT
static BSLS_KEYWORD_CONSTEXPR const t_TYPE & forward(const t_TYPE &t) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_util.h:460
static BSLS_KEYWORD_CONSTEXPR bsl::remove_reference< t_TYPE >::type & moveIfSupported(t_TYPE &t) BSLS_KEYWORD_NOEXCEPT
static BSLA_NODISCARD BSLS_KEYWORD_CONSTEXPR const t_TYPE & forward_like(bslmf::MovableRef< t_TYPE > t, typename bsl::enable_if< bslmf::MovableRefUtil::IsLvalueReference< t_MODEL >::value &&bsl::is_const< typename bslmf::MovableRefUtil::RemoveReference< t_MODEL >::type >::value >::type *=0) BSLS_KEYWORD_NOEXCEPT
static BSLS_KEYWORD_CONSTEXPR const t_TYPE & forwardAsReference(const t_TYPE &t) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_util.h:666