Get compiled with G++ 4.6.3
force to create lib/, initially empty.
Fix include bug, showed up with clang.

$ clang --version
clang version 2.8 (branches/release_28)
Target: x86_64-redhat-linux-gnu
Thread model: posix

nevertheless, 'clang' itself crashed:

$ make CXX=clang
clang -rdynamic -g -O2 -Wall -Iinclude -Wno-invalid-offsetof -Wno-strict-aliasing -c -o lib/coe--context.o src/coe--context.cpp
clang: warning: argument unused during compilation: '-rdynamic'
0  libLLVM-2.8.so  0x0000003e22cf023f
1  libLLVM-2.8.so  0x0000003e22cf0d3a
2  libpthread.so.0 0x000000373480f4a0
3  clang           0x0000000000a8ff38 clang::CXXBasePaths::lookupInBases(clang::ASTContext&, clang::CXXRecordDecl const*, bool (*)(clang::CXXBaseSpecifier const*, clang::CXXBasePath&, void*), void*) + 72
4  clang           0x0000000000a90aa3 clang::CXXRecordDecl::lookupInBases(bool (*)(clang::CXXBaseSpecifier const*, clang::CXXBasePath&, void*), void*, clang::CXXBasePaths&) const + 51
5  clang           0x00000000007703d1
6  clang           0x0000000000770eaf
7  clang           0x000000000077154e clang::Sema::CXXCheckCStyleCast(clang::SourceRange, clang::QualType, clang::Expr*&, clang::CastKind&, llvm::SmallVector<clang::CXXBaseSpecifier*, 4u>&, bool) + 942
8  clang           0x0000000000820871 clang::Sema::CheckCastTypes(clang::SourceRange, clang::QualType, clang::Expr*&, clang::CastKind&, llvm::SmallVector<clang::CXXBaseSpecifier*, 4u>&, bool) + 593
9  clang           0x0000000000851f1b clang::Sema::ActOnCXXTypeConstructExpr(clang::SourceRange, clang::OpaquePtr<clang::QualType>, clang::SourceLocation, clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation*, clang::SourceLocation) + 1435
10 clang           0x00000000008f839b
11 clang           0x00000000008ea8ea
12 clang           0x00000000008f44f4
13 clang           0x00000000008ea7e5
14 clang           0x00000000008f5045
15 clang           0x00000000008f5f62
16 clang           0x00000000008f4eb7
17 clang           0x00000000008f60bd clang::Sema::SubstStmt(clang::Stmt*, clang::MultiLevelTemplateArgumentList const&) + 45
18 clang           0x0000000000904007 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool) + 759
19 clang           0x0000000000903a6f clang::Sema::PerformPendingInstantiations(bool) + 271
20 clang           0x000000000075edaa clang::Sema::ActOnEndOfTranslationUnit() + 954
21 clang           0x000000000072c339 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 201
22 clang           0x000000000071646b clang::ParseAST(clang::Sema&, bool) + 139
23 clang           0x00000000005ffa83 clang::CodeGenAction::ExecuteAction() + 51
24 clang           0x000000000051fc67 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 295
25 clang           0x00000000005041f5 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1141
26 clang           0x00000000004fbca4 cc1_main(char const**, char const**, char const*, void*) + 612
27 clang           0x0000000000503008 main + 3848
28 libc.so.6       0x000000373401ecdd __libc_start_main + 253
29 clang           0x00000000004faf49
Stack dump:
0.	Program arguments: /usr/bin/clang -cc1 -triple x86_64-redhat-linux-gnu -S -disable-free -disable-llvm-verifier -main-file-name coe--context.cpp -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.20.51.0.2 -g -resource-dir /usr/lib/clang/2.8 -I include -O2 -Wall -Wno-invalid-offsetof -Wno-strict-aliasing -ferror-limit 19 -fmessage-length 131 -fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-v7S8ST.s -x c++ src/coe--context.cpp
1.	<eof> parser at end of file
2.	include/coe-kernel--dcl.h:442:5: instantiating function definition 'HandlerX'
clang: error: clang frontend command failed due to signal 11 (use -v to see invocation)
make: *** [lib/coe--context.o] Error 245
Rename _Atomic on which 'clang' choked.

Code had compiled sucessfully with

$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

However, with

$ clang --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: i386-pc-linux-gnu
Thread model: posix

got the following

include/coe--local.h:72:1: error: declaration of anonymous class must be a definition
class _Atomic : private _Noncopyable {
^
include/coe--local.h:72:1: warning: declaration does not declare anything [-Wmissing-declarations]

Interestingly, word "_Atomic" was recognized by Vim and highlighted ;)

After rename to "_AtomIC", this 'clang' itself crashed :(

clang ...blah blah... src/coe-callback-sev.cpp
1.      <eof> parser at end of file
2.      include/coe-kernel--dcl.h:442:5: instantiating function definition 'HandlerX'
clang: error: unable to execute command: Segmentation fault (core dumped)
Small change preventing 'clang' to crash.

Now clang 2.8 (RHEL 6.1) doesn't crash, although reports bunch of errors like:
src/coe-kernel--imp.cpp:130:18: error: cannot dereference pointer into incomplete class type 'coe::HandlerX::_Obj'
            (_obj->*_fun.m0)(kernel);
                 ^
This may be the following
[LLVMbugs] [Bug 8328] New: Unable to call method of incomplete class
http://lists.cs.uiuc.edu/pipermail/llvmbugs/2010-October/015108.html
which I reproduced with this clang 2.8, and don't see with clang 3.0 (ubuntu 12.04).
Successful build with clang++ 3.0 (!)

When compile clang recognizes .cpp as C++ source,
but to link the application clang++ is required--
--similarly as with gcc/g++ (how could I forget!)

make CXX=clang++ all