CPP/Boost/Signals2/Parameters

From ProgrammingExamples

< CPP
Jump to: navigation, search

Parameters.cpp

#include <boost/signals2/signal.hpp>
#include <iostream>
 
void func(float value)
{
  std::cout << "value is " << value << std::endl;
}
 
int main()
{
  boost::signals2::signal<void (float)> s;
  s.connect(func);
  s(5.1);
}

CMakeLists.txt

cmake_minimum_required(VERSION 2.6)
 
Project(Parameters)
 
ADD_EXECUTABLE(Parameters Parameters.cpp)
Personal tools