Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 1.38 KB

is-placeholder-class.md

File metadata and controls

68 lines (54 loc) · 1.38 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
is_placeholder Class | Microsoft Docs
11/04/2016
cpp-standard-libraries
article
functional/std::is_placeholder
C++
is_placeholder class
2b21a792-96d1-4bb8-b911-0db796510835
22
corob-msft
corob
ghogen

is_placeholder Class

Tests if type is a placeholder.

Syntax

struct is_placeholder {
static const int value;
};

Remarks

The constant value value is 0 if the type Ty is not a placeholder; otherwise, its value is the position of the function call argument that it binds to. You use it to determine the value N for the Nth placeholder _N.

Example

// std__functional__is_placeholder.cpp   
// compile with: /EHsc   
#include <functional>   
#include <iostream>   
  
using namespace std::placeholders;   
  
template<class Expr>
void test_for_placeholder(const Expr&)
{
    std::cout << std::is_placeholder<Expr>::value << std::endl;
}

int main()
{
    test_for_placeholder(3.0);
    test_for_placeholder(_3);

    return (0);
}  
0  
3  

Requirements

Header: <functional>

Namespace: std

See Also

_1 Object