parent
39002095c9
commit
92084b6d9e
3 changed files with 46 additions and 0 deletions
@ -0,0 +1,12 @@ |
||||
#include<boost/thread.hpp> |
||||
|
||||
struct callable { |
||||
void operator()() {}; |
||||
}; |
||||
|
||||
int main(int argc, char **argv) { |
||||
callable x; |
||||
boost::thread thr(x); |
||||
thr.join(); |
||||
return 0; |
||||
} |
@ -0,0 +1,14 @@ |
||||
project('boosttest', 'cxx') |
||||
|
||||
# One test case for a Boost module that is |
||||
# header only and one test case for a module that |
||||
# requires linking with a shared library. |
||||
|
||||
nolinkdep = find_dep('boost', modules : 'utility', required : true) |
||||
linkdep = find_dep('boost', modules : 'thread', required : true) |
||||
|
||||
nolinkexe = executable('nolinkexe', 'nolinkexe.cc', dep : nolinkdep) |
||||
linkexe = executable('linkedexe', 'linkexe.cc', dep : linkdep) |
||||
|
||||
add_test('nolinktest', nolinkexe) |
||||
add_test('linktext', linkexe) |
@ -0,0 +1,20 @@ |
||||
#include<boost/utility.hpp> |
||||
|
||||
class MyClass : boost::noncopyable { |
||||
private: |
||||
int x; |
||||
|
||||
public: |
||||
MyClass() { |
||||
x = 44; |
||||
} |
||||
|
||||
int getValue() const { return x; } |
||||
}; |
||||
|
||||
int main(int argc, char **argv) { |
||||
MyClass foo; |
||||
if(foo.getValue() == 44) |
||||
return 0; |
||||
return 1; |
||||
} |
Loading…
Reference in new issue