This prevents compilation errors such as the following:
bam_reader.cpp: In function ‘int main()’:
bam_reader.cpp:8:1: error: reference to ‘BamReader’ is ambiguous
BamReader bw;
^~~~~~~~~
In file included from bam_reader.cpp:1:0:
/home-1/dbaker49@jhu.edu/work/db/code/sl/SeqLib/SeqLib/BamReader.h:14:7: note: candidates are: class BamReader
class BamReader;
^~~~~~~~~
/home-1/dbaker49@jhu.edu/work/db/code/sl/SeqLib/SeqLib/BamReader.h:116:7: note: class SeqLib::BamReader
class BamReader {
This only occurs when using namespace SeqLib. It seems that the forward declaration was for a distinct type because it occurred in a different namespace.
This prevents compilation errors such as the following:
This only occurs when
using namespace SeqLib
. It seems that the forward declaration was for a distinct type because it occurred in a different namespace.