Support Class Library
A set of tools providing classes and utility
Placeholder.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace scl{
4  namespace utils{
9  struct Placeholder final{
10  constexpr Placeholder() = default;
11  constexpr Placeholder(const Placeholder&) = default;
12  constexpr Placeholder(Placeholder&&) = default;
13  Placeholder& operator=(const Placeholder&) = default;
14  Placeholder& operator=(Placeholder&&) = default;
15  ~Placeholder() = default;
16 
21  template <class T>
22  constexpr Placeholder(T&&){}
23 
29  template <class T>
30  constexpr const Placeholder& operator=(T&&) const{ return *this; }
31  };
32 
33 
38  namespace placeholder{
39  constexpr scl::utils::Placeholder _ = {};
40  }
41  }
42 }
Global namespace of the SCL.
Definition: alias.hpp:3
Placeholder & operator=(const Placeholder &)=default
constexpr Placeholder(T &&)
Construct a placeholder from any kind of data.
Definition: Placeholder.h:22
Class representing parameter/return argument placholders.
Definition: Placeholder.h:9
constexpr scl::utils::Placeholder _
Definition: Placeholder.h:39
constexpr Placeholder()=default
constexpr const Placeholder & operator=(T &&) const
Assign to a placeholder.
Definition: Placeholder.h:30