Skip to content

Commit bf2f3bc

Browse files
author
Ulrich Becker
committed
Function pointer replaced by template std::function for more flexibility.
1 parent 79080e5 commit bf2f3bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/parse_opts.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <string>
5252
#include <iostream>
5353
#include <vector>
54+
#include <functional>
5455

5556
//! @brief Name-space of the Command-Line-Option-Parser.
5657
namespace CLOP
@@ -73,8 +74,8 @@ struct OPTION
7374
//! @retval >0 Function was not successful. \n
7475
//! In this case the parser continues its work but
7576
//! the return value of the parser will be -1.
76-
typedef int (*FUNC_T)( PARSER* );
77-
77+
using FUNC_T = std::function<int(PARSER*)>;
78+
7879
//! @brief Definition of the option-type.
7980
enum ARG_REQUIRE_T
8081
{

0 commit comments

Comments
 (0)